generated-configure.sh revision 2339:de80886290c6
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
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751CXXSTD_CXXFLAG
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JT_HOME
790JTREGEXE
791HOTSPOT_TOOLCHAIN_TYPE
792USING_BROKEN_SUSE_LD
793PACKAGE_PATH
794USE_CLANG
795HOTSPOT_LD
796HOTSPOT_CXX
797HOTSPOT_RC
798HOTSPOT_MT
799BUILD_AS
800BUILD_LDCXX
801BUILD_LD
802BUILD_STRIP
803BUILD_OBJCOPY
804BUILD_AR
805BUILD_NM
806BUILD_CXX
807BUILD_CC
808BUILD_SYSROOT_LDFLAGS
809BUILD_SYSROOT_CFLAGS
810ac_ct_OBJDUMP
811OBJDUMP
812ac_ct_OBJCOPY
813OBJCOPY
814ac_ct_NM
815ac_ct_STRIP
816GNM
817NM
818STRIP
819MSBUILD
820DUMPBIN
821RC
822MT
823LIPO
824ac_ct_AR
825AR
826AS
827LDCXX
828LD
829CXXCPP
830CPP
831CXX_VERSION_NUMBER
832CC_VERSION_NUMBER
833ac_ct_CXX
834CXXFLAGS
835CXX
836TOOLCHAIN_PATH_CXX
837POTENTIAL_CXX
838OBJEXT
839EXEEXT
840ac_ct_CC
841CPPFLAGS
842LDFLAGS
843CFLAGS
844CC
845TOOLCHAIN_PATH_CC
846POTENTIAL_CC
847TOOLCHAIN_VERSION
848VS_LIB
849VS_INCLUDE
850VS_PATH
851CYGWIN_LINK
852SYSROOT_LDFLAGS
853SYSROOT_CFLAGS
854EXTRA_LDFLAGS
855EXTRA_CXXFLAGS
856EXTRA_CFLAGS
857LEGACY_EXTRA_LDFLAGS
858LEGACY_EXTRA_CXXFLAGS
859LEGACY_EXTRA_CFLAGS
860EXE_SUFFIX
861OBJ_SUFFIX
862STATIC_LIBRARY
863SHARED_LIBRARY
864STATIC_LIBRARY_SUFFIX
865SHARED_LIBRARY_SUFFIX
866LIBRARY_PREFIX
867TOOLCHAIN_TYPE
868STATIC_BUILD
869IMPORT_MODULES_MAKE
870IMPORT_MODULES_SRC
871IMPORT_MODULES_CONF
872IMPORT_MODULES_LIBS
873IMPORT_MODULES_CMDS
874IMPORT_MODULES_CLASSES
875BUILD_HOTSPOT
876HOTSPOT_DIST
877BUILD_OUTPUT
878JDK_TOPDIR
879NASHORN_TOPDIR
880HOTSPOT_TOPDIR
881JAXWS_TOPDIR
882JAXP_TOPDIR
883CORBA_TOPDIR
884LANGTOOLS_TOPDIR
885EXTERNAL_BUILDJDK
886BUILD_JDK
887CREATE_BUILDJDK
888JLINK
889JMOD
890BOOT_JDK_BITS
891JAVAC_FLAGS
892BOOT_JDK_MODULAR
893BOOT_JDK_SOURCETARGET
894JARSIGNER
895JAR
896JAVAH
897JAVAC
898JAVA
899BOOT_JDK
900JAVA_CHECK
901JAVAC_CHECK
902VERSION_IS_GA
903VERSION_SHORT
904VERSION_STRING
905VERSION_NUMBER_FOUR_POSITIONS
906VERSION_NUMBER
907VERSION_OPT
908VERSION_BUILD
909VERSION_PRE
910VERSION_PATCH
911VERSION_SECURITY
912VERSION_MINOR
913VERSION_MAJOR
914MACOSX_BUNDLE_ID_BASE
915MACOSX_BUNDLE_NAME_BASE
916HOTSPOT_VM_DISTRO
917COMPANY_NAME
918JDK_RC_PLATFORM_NAME
919PRODUCT_SUFFIX
920PRODUCT_NAME
921LAUNCHER_NAME
922JLINK_KEEP_PACKAGED_MODULES
923COPYRIGHT_YEAR
924COMPRESS_JARS
925INCLUDE_SA
926UNLIMITED_CRYPTO
927CACERTS_FILE
928ENABLE_HEADLESS_ONLY
929DEFAULT_MAKE_TARGET
930OS_VERSION_MICRO
931OS_VERSION_MINOR
932OS_VERSION_MAJOR
933PKG_CONFIG
934BASH_ARGS
935SETFILE
936CODESIGN
937XATTR
938DSYMUTIL
939IS_GNU_TIME
940PATCH
941DTRACE
942TIME
943STAT
944HG
945READELF
946OTOOL
947LDD
948ZIPEXE
949UNZIP
950TAR_SUPPORTS_TRANSFORM
951TAR_INCLUDE_PARAM
952TAR_CREATE_EXTRA_PARAM
953TAR_TYPE
954FIND_DELETE
955OUTPUT_SYNC
956OUTPUT_SYNC_SUPPORTED
957CHECK_TOOLSDIR_MAKE
958CHECK_TOOLSDIR_GMAKE
959CHECK_MAKE
960CHECK_GMAKE
961MAKE
962PKGHANDLER
963CONFIGURESUPPORT_OUTPUTDIR
964OUTPUT_ROOT
965CONF_NAME
966SPEC
967SDKROOT
968XCODEBUILD
969VALID_JVM_VARIANTS
970JVM_VARIANTS
971DEBUG_LEVEL
972HOTSPOT_DEBUG_LEVEL
973JDK_VARIANT
974USERNAME
975CANONICAL_TOPDIR
976ORIGINAL_TOPDIR
977TOPDIR
978PATH_SEP
979ZERO_ARCHDEF
980HOTSPOT_BUILD_CPU_DEFINE
981HOTSPOT_BUILD_CPU_ARCH
982HOTSPOT_BUILD_CPU
983HOTSPOT_BUILD_OS_TYPE
984HOTSPOT_BUILD_OS
985OPENJDK_BUILD_BUNDLE_PLATFORM
986OPENJDK_BUILD_CPU_BUNDLE
987OPENJDK_BUILD_OS_BUNDLE
988OPENJDK_BUILD_OS_EXPORT_DIR
989OPENJDK_BUILD_CPU_JLI_CFLAGS
990OPENJDK_BUILD_CPU_OSARCH
991OPENJDK_BUILD_CPU_ISADIR
992OPENJDK_BUILD_CPU_LIBDIR
993OPENJDK_BUILD_CPU_LEGACY_LIB
994OPENJDK_BUILD_CPU_LEGACY
995HOTSPOT_TARGET_CPU_DEFINE
996HOTSPOT_TARGET_CPU_ARCH
997HOTSPOT_TARGET_CPU
998HOTSPOT_TARGET_OS_TYPE
999HOTSPOT_TARGET_OS
1000DEFINE_CROSS_COMPILE_ARCH
1001LP64
1002OPENJDK_TARGET_BUNDLE_PLATFORM
1003OPENJDK_TARGET_CPU_BUNDLE
1004OPENJDK_TARGET_OS_BUNDLE
1005OPENJDK_TARGET_OS_EXPORT_DIR
1006OPENJDK_TARGET_CPU_JLI_CFLAGS
1007OPENJDK_TARGET_CPU_OSARCH
1008OPENJDK_TARGET_CPU_ISADIR
1009OPENJDK_TARGET_CPU_LIBDIR
1010OPENJDK_TARGET_CPU_LEGACY_LIB
1011OPENJDK_TARGET_CPU_LEGACY
1012REQUIRED_OS_VERSION
1013REQUIRED_OS_NAME
1014COMPILE_TYPE
1015OPENJDK_TARGET_CPU_ENDIAN
1016OPENJDK_TARGET_CPU_BITS
1017OPENJDK_TARGET_CPU_ARCH
1018OPENJDK_TARGET_CPU
1019OPENJDK_TARGET_OS_ENV
1020OPENJDK_TARGET_OS_TYPE
1021OPENJDK_TARGET_OS
1022OPENJDK_BUILD_CPU_ENDIAN
1023OPENJDK_BUILD_CPU_BITS
1024OPENJDK_BUILD_CPU_ARCH
1025OPENJDK_BUILD_CPU
1026OPENJDK_BUILD_OS_ENV
1027OPENJDK_BUILD_OS_TYPE
1028OPENJDK_BUILD_OS
1029OPENJDK_BUILD_AUTOCONF_NAME
1030OPENJDK_TARGET_AUTOCONF_NAME
1031target_os
1032target_vendor
1033target_cpu
1034target
1035host_os
1036host_vendor
1037host_cpu
1038host
1039build_os
1040build_vendor
1041build_cpu
1042build
1043NICE
1044CPIO
1045DF
1046READLINK
1047CYGPATH
1048SED
1049FGREP
1050EGREP
1051GREP
1052AWK
1053XARGS
1054WHICH
1055WC
1056UNIQ
1057UNAME
1058TR
1059TOUCH
1060TEE
1061TAR
1062TAIL
1063SORT
1064SH
1065RMDIR
1066RM
1067PRINTF
1068NAWK
1069MV
1070MKTEMP
1071MKDIR
1072LS
1073LN
1074GZIP
1075GUNZIP
1076HEAD
1077FIND
1078FILE
1079EXPR
1080ECHO
1081DIRNAME
1082DIFF
1083DATE
1084CUT
1085CP
1086COMM
1087CMP
1088CHMOD
1089CAT
1090BASH
1091BASENAME
1092DATE_WHEN_CONFIGURED
1093ORIGINAL_PATH
1094CONFIGURE_COMMAND_LINE
1095target_alias
1096host_alias
1097build_alias
1098LIBS
1099ECHO_T
1100ECHO_N
1101ECHO_C
1102DEFS
1103mandir
1104localedir
1105libdir
1106psdir
1107pdfdir
1108dvidir
1109htmldir
1110infodir
1111docdir
1112oldincludedir
1113includedir
1114localstatedir
1115sharedstatedir
1116sysconfdir
1117datadir
1118datarootdir
1119libexecdir
1120sbindir
1121bindir
1122program_transform_name
1123prefix
1124exec_prefix
1125PACKAGE_URL
1126PACKAGE_BUGREPORT
1127PACKAGE_STRING
1128PACKAGE_VERSION
1129PACKAGE_TARNAME
1130PACKAGE_NAME
1131PATH_SEPARATOR
1132SHELL'
1133ac_subst_files=''
1134ac_user_opts='
1135enable_option_checking
1136with_target_bits
1137enable_openjdk_only
1138with_custom_make_dir
1139with_jdk_variant
1140enable_debug
1141with_debug_level
1142with_jvm_variants
1143with_devkit
1144with_sys_root
1145with_sysroot
1146with_tools_dir
1147with_toolchain_path
1148with_extra_path
1149with_sdk_name
1150with_conf_name
1151with_output_sync
1152with_default_make_target
1153enable_headless_only
1154with_cacerts_file
1155enable_unlimited_crypto
1156with_copyright_year
1157enable_keep_packaged_modules
1158with_milestone
1159with_update_version
1160with_user_release_suffix
1161with_build_number
1162with_version_string
1163with_version_pre
1164with_version_opt
1165with_version_build
1166with_version_major
1167with_version_minor
1168with_version_security
1169with_version_patch
1170with_boot_jdk
1171with_build_jdk
1172with_add_source_root
1173with_override_source_root
1174with_adds_and_overrides
1175with_override_langtools
1176with_override_corba
1177with_override_jaxp
1178with_override_jaxws
1179with_override_hotspot
1180with_override_nashorn
1181with_override_jdk
1182with_import_hotspot
1183with_import_modules
1184enable_static_build
1185with_toolchain_type
1186with_extra_cflags
1187with_extra_cxxflags
1188with_extra_ldflags
1189with_toolchain_version
1190with_build_devkit
1191with_jtreg
1192enable_warnings_as_errors
1193with_native_debug_symbols
1194enable_debug_symbols
1195enable_zip_debug_info
1196enable_native_coverage
1197enable_dtrace
1198with_jvm_features
1199with_jvm_interpreter
1200enable_hotspot_gtest
1201with_stdc__lib
1202with_msvcr_dll
1203with_msvcp_dll
1204with_x
1205with_cups
1206with_cups_include
1207with_freetype
1208with_freetype_include
1209with_freetype_lib
1210with_freetype_src
1211enable_freetype_bundling
1212with_alsa
1213with_alsa_include
1214with_alsa_lib
1215with_libffi
1216with_libffi_include
1217with_libffi_lib
1218with_libjpeg
1219with_giflib
1220with_libpng
1221with_zlib
1222with_lcms
1223with_dxsdk
1224with_dxsdk_lib
1225with_dxsdk_include
1226enable_jtreg_failure_handler
1227enable_generate_classlist
1228with_num_cores
1229with_memory_size
1230with_jobs
1231with_test_jobs
1232with_boot_jdk_jvmargs
1233with_sjavac_server_java
1234enable_sjavac
1235enable_javac_server
1236enable_icecc
1237enable_precompiled_headers
1238enable_ccache
1239with_ccache_dir
1240'
1241      ac_precious_vars='build_alias
1242host_alias
1243target_alias
1244BASENAME
1245BASH
1246CAT
1247CHMOD
1248CMP
1249COMM
1250CP
1251CUT
1252DATE
1253DIFF
1254DIRNAME
1255ECHO
1256EXPR
1257FILE
1258FIND
1259HEAD
1260GUNZIP
1261GZIP
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293MAKE
1294UNZIP
1295ZIPEXE
1296LDD
1297OTOOL
1298READELF
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --enable-headless-only  only build headless (no GUI) support [disabled]
1977  --enable-unlimited-crypto
1978                          Enable unlimited crypto policy [disabled]
1979  --disable-keep-packaged-modules
1980                          Do not keep packaged modules in jdk image [enable]
1981  --enable-static-build   enable static library build [disabled]
1982  --disable-warnings-as-errors
1983                          do not consider native warnings to be an error
1984                          [enabled]
1985  --enable-debug-symbols  Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --enable-zip-debug-info Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-native-coverage
1990                          enable native compilation with code coverage
1991                          data[disabled]
1992  --enable-dtrace[=yes/no/auto]
1993                          enable dtrace. Default is auto, where dtrace is
1994                          enabled if all dependencies are present.
1995  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1996  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --enable-jtreg-failure-handler
2001                          forces build of the jtreg failure handler to be
2002                          enabled, missing dependencies become fatal errors.
2003                          Default is auto, where the failure handler is built
2004                          if all dependencies are present and otherwise just
2005                          disabled.
2006  --disable-generate-classlist
2007                          forces enabling or disabling of the generation of a
2008                          CDS classlist at build time. Default is to generate
2009                          it when either the server or client JVMs are built.
2010  --enable-sjavac         use sjavac to do fast incremental compiles
2011                          [disabled]
2012  --disable-javac-server  disable javac server [enabled]
2013  --enable-icecc          enable distribted compilation of native code using
2014                          icecc/icecream [disabled]
2015  --disable-precompiled-headers
2016                          disable using precompiled headers when compiling C++
2017                          [enabled]
2018  --enable-ccache         enable using ccache to speed up recompilations
2019                          [disabled]
2020
2021Optional Packages:
2022  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2023  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2024  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2025                          support it), e.g. --with-target-bits=32 [guessed]
2026  --with-custom-make-dir  Deprecated. Option is kept for backwards
2027                          compatibility and is ignored
2028  --with-jdk-variant      JDK variant to build (normal) [normal]
2029  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2030                          optimized) [release]
2031  --with-jvm-variants     JVM variants (separated by commas) to build
2032                          (server,client,minimal,core,zero,zeroshark,custom)
2033                          [server]
2034  --with-devkit           use this devkit for compilers, tools and resources
2035  --with-sys-root         alias for --with-sysroot for backwards compatability
2036  --with-sysroot          use this directory as sysroot
2037  --with-tools-dir        alias for --with-toolchain-path for backwards
2038                          compatibility
2039  --with-toolchain-path   prepend these directories when searching for
2040                          toolchain binaries (compilers etc)
2041  --with-extra-path       prepend these directories to the default path
2042  --with-sdk-name         use the platform SDK of the given name. [macosx]
2043  --with-conf-name        use this as the name of the configuration [generated
2044                          from important configuration options]
2045  --with-output-sync      set make output sync type if supported by make.
2046                          [recurse]
2047  --with-default-make-target
2048                          set the default make target [exploded-image]
2049  --with-cacerts-file     specify alternative cacerts file
2050  --with-copyright-year   Set copyright year value for build [current year]
2051  --with-milestone        Deprecated. Option is kept for backwards
2052                          compatibility and is ignored
2053  --with-update-version   Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-user-release-suffix
2056                          Deprecated. Option is kept for backwards
2057                          compatibility and is ignored
2058  --with-build-number     Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-version-string   Set version string [calculated]
2061  --with-version-pre      Set the base part of the version 'PRE' field
2062                          (pre-release identifier) ['internal']
2063  --with-version-opt      Set version 'OPT' field (build metadata)
2064                          [<timestamp>.<user>.<dirname>]
2065  --with-version-build    Set version 'BUILD' field (build number) [not
2066                          specified]
2067  --with-version-major    Set version 'MAJOR' field (first number) [current
2068                          source value]
2069  --with-version-minor    Set version 'MINOR' field (second number) [current
2070                          source value]
2071  --with-version-security Set version 'SECURITY' field (third number) [current
2072                          source value]
2073  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2074                          specified]
2075  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2076  --with-build-jdk        path to JDK of same version as is being built[the
2077                          newly built JDK]
2078  --with-add-source-root  Deprecated. Option is kept for backwards
2079                          compatibility and is ignored
2080  --with-override-source-root
2081                          Deprecated. Option is kept for backwards
2082                          compatibility and is ignored
2083  --with-adds-and-overrides
2084                          Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-langtools
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-override-corba   Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-jaxp    Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxws   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-hotspot Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-nashorn Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jdk     Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-import-hotspot   import hotspot binaries from this jdk image or
2102                          hotspot build dist dir instead of building from
2103                          source
2104  --with-import-modules   import a set of prebuilt modules either as a zip
2105                          file or an exploded directory
2106  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2107                          to show possible values [platform dependent]
2108  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2109  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2110  --with-extra-ldflags    extra flags to be used when linking jdk
2111  --with-toolchain-version
2112                          the version of the toolchain to look for, use
2113                          '--help' to show possible values [platform
2114                          dependent]
2115  --with-build-devkit     Devkit to use for the build platform toolchain
2116  --with-jtreg            Regression Test Harness [probed]
2117  --with-native-debug-symbols
2118                          set the native debug symbol configuration (none,
2119                          internal, external, zipped) [varying]
2120  --with-jvm-features     additional JVM features to enable (separated by
2121                          comma), use '--help' to show possible values [none]
2122  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2123                          compatibility and is ignored
2124  --with-stdc++lib=<static>,<dynamic>,<default>
2125                          force linking of the C++ runtime on Linux to either
2126                          static or dynamic, default is static with dynamic as
2127                          fallback
2128  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2129                          (Windows only) [probed]
2130  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2131                          (Windows only) [probed]
2132  --with-x                use the X Window System
2133  --with-cups             specify prefix directory for the cups package
2134                          (expecting the headers under PATH/include)
2135  --with-cups-include     specify directory for the cups include files
2136  --with-freetype         specify prefix directory for the freetype package
2137                          (expecting the libraries under PATH/lib and the
2138                          headers under PATH/include)
2139  --with-freetype-include specify directory for the freetype include files
2140  --with-freetype-lib     specify directory for the freetype library
2141  --with-freetype-src     specify directory with freetype sources to
2142                          automatically build the library (experimental,
2143                          Windows-only)
2144  --with-alsa             specify prefix directory for the alsa package
2145                          (expecting the libraries under PATH/lib and the
2146                          headers under PATH/include)
2147  --with-alsa-include     specify directory for the alsa include files
2148  --with-alsa-lib         specify directory for the alsa library
2149  --with-libffi           specify prefix directory for the libffi package
2150                          (expecting the libraries under PATH/lib and the
2151                          headers under PATH/include)
2152  --with-libffi-include   specify directory for the libffi include files
2153  --with-libffi-lib       specify directory for the libffi library
2154  --with-libjpeg          use libjpeg from build system or OpenJDK source
2155                          (system, bundled) [bundled]
2156  --with-giflib           use giflib from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-libpng           use libpng from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-zlib             use zlib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-lcms             use lcms2 from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-dxsdk            Deprecated. Option is kept for backwards
2165                          compatibility and is ignored
2166  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2167                          compatibility and is ignored
2168  --with-dxsdk-include    Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-num-cores        number of cores in the build system, e.g.
2171                          --with-num-cores=8 [probed]
2172  --with-memory-size      memory (in MB) available in the build system, e.g.
2173                          --with-memory-size=1024 [probed]
2174  --with-jobs             number of parallel jobs to let make run [calculated
2175                          based on cores and memory]
2176  --with-test-jobs        number of parallel tests jobs to run [based on build
2177                          jobs]
2178  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2179                          invocations of boot JDK, overriding the default
2180                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2181                          -enableassertions"
2182  --with-sjavac-server-java
2183                          use this java binary for running the sjavac
2184                          background server [Boot JDK java]
2185  --with-ccache-dir       where to store ccache files [~/.ccache]
2186
2187Some influential environment variables:
2188  BASENAME    Override default value for BASENAME
2189  BASH        Override default value for BASH
2190  CAT         Override default value for CAT
2191  CHMOD       Override default value for CHMOD
2192  CMP         Override default value for CMP
2193  COMM        Override default value for COMM
2194  CP          Override default value for CP
2195  CUT         Override default value for CUT
2196  DATE        Override default value for DATE
2197  DIFF        Override default value for DIFF
2198  DIRNAME     Override default value for DIRNAME
2199  ECHO        Override default value for ECHO
2200  EXPR        Override default value for EXPR
2201  FILE        Override default value for FILE
2202  FIND        Override default value for FIND
2203  HEAD        Override default value for HEAD
2204  GUNZIP      Override default value for GUNZIP
2205  GZIP        Override default value for GZIP
2206  LN          Override default value for LN
2207  LS          Override default value for LS
2208  MKDIR       Override default value for MKDIR
2209  MKTEMP      Override default value for MKTEMP
2210  MV          Override default value for MV
2211  NAWK        Override default value for NAWK
2212  PRINTF      Override default value for PRINTF
2213  RM          Override default value for RM
2214  RMDIR       Override default value for RMDIR
2215  SH          Override default value for SH
2216  SORT        Override default value for SORT
2217  TAIL        Override default value for TAIL
2218  TAR         Override default value for TAR
2219  TEE         Override default value for TEE
2220  TOUCH       Override default value for TOUCH
2221  TR          Override default value for TR
2222  UNAME       Override default value for UNAME
2223  UNIQ        Override default value for UNIQ
2224  WC          Override default value for WC
2225  WHICH       Override default value for WHICH
2226  XARGS       Override default value for XARGS
2227  AWK         Override default value for AWK
2228  GREP        Override default value for GREP
2229  EGREP       Override default value for EGREP
2230  FGREP       Override default value for FGREP
2231  SED         Override default value for SED
2232  CYGPATH     Override default value for CYGPATH
2233  READLINK    Override default value for READLINK
2234  DF          Override default value for DF
2235  CPIO        Override default value for CPIO
2236  NICE        Override default value for NICE
2237  MAKE        Override default value for MAKE
2238  UNZIP       Override default value for UNZIP
2239  ZIPEXE      Override default value for ZIPEXE
2240  LDD         Override default value for LDD
2241  OTOOL       Override default value for OTOOL
2242  READELF     Override default value for READELF
2243  HG          Override default value for HG
2244  STAT        Override default value for STAT
2245  TIME        Override default value for TIME
2246  DTRACE      Override default value for DTRACE
2247  PATCH       Override default value for PATCH
2248  DSYMUTIL    Override default value for DSYMUTIL
2249  XATTR       Override default value for XATTR
2250  CODESIGN    Override default value for CODESIGN
2251  SETFILE     Override default value for SETFILE
2252  PKG_CONFIG  path to pkg-config utility
2253  JAVA        Override default value for JAVA
2254  JAVAC       Override default value for JAVAC
2255  JAVAH       Override default value for JAVAH
2256  JAR         Override default value for JAR
2257  JARSIGNER   Override default value for JARSIGNER
2258  CC          C compiler command
2259  CFLAGS      C compiler flags
2260  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2261              nonstandard directory <lib dir>
2262  LIBS        libraries to pass to the linker, e.g. -l<library>
2263  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2264              you have headers in a nonstandard directory <include dir>
2265  CXX         C++ compiler command
2266  CXXFLAGS    C++ compiler flags
2267  CPP         C preprocessor
2268  CXXCPP      C++ preprocessor
2269  AS          Override default value for AS
2270  AR          Override default value for AR
2271  LIPO        Override default value for LIPO
2272  STRIP       Override default value for STRIP
2273  NM          Override default value for NM
2274  GNM         Override default value for GNM
2275  OBJCOPY     Override default value for OBJCOPY
2276  OBJDUMP     Override default value for OBJDUMP
2277  BUILD_CC    Override default value for BUILD_CC
2278  BUILD_CXX   Override default value for BUILD_CXX
2279  BUILD_NM    Override default value for BUILD_NM
2280  BUILD_AR    Override default value for BUILD_AR
2281  BUILD_OBJCOPY
2282              Override default value for BUILD_OBJCOPY
2283  BUILD_STRIP Override default value for BUILD_STRIP
2284  JTREGEXE    Override default value for JTREGEXE
2285  XMKMF       Path to xmkmf, Makefile generator for X Window System
2286  FREETYPE_CFLAGS
2287              C compiler flags for FREETYPE, overriding pkg-config
2288  FREETYPE_LIBS
2289              linker flags for FREETYPE, overriding pkg-config
2290  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2291  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2292  LIBFFI_CFLAGS
2293              C compiler flags for LIBFFI, overriding pkg-config
2294  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2295  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2296  PNG_LIBS    linker flags for PNG, overriding pkg-config
2297  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2298  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2299  ICECC_CMD   Override default value for ICECC_CMD
2300  ICECC_CREATE_ENV
2301              Override default value for ICECC_CREATE_ENV
2302  ICECC_WRAPPER
2303              Override default value for ICECC_WRAPPER
2304  CCACHE      Override default value for CCACHE
2305
2306Use these variables to override the choices made by `configure' or to help
2307it to find libraries and programs with nonstandard names/locations.
2308
2309Report bugs to <build-dev@openjdk.java.net>.
2310OpenJDK home page: <http://openjdk.java.net>.
2311_ACEOF
2312ac_status=$?
2313fi
2314
2315if test "$ac_init_help" = "recursive"; then
2316  # If there are subdirs, report their specific --help.
2317  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318    test -d "$ac_dir" ||
2319      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320      continue
2321    ac_builddir=.
2322
2323case "$ac_dir" in
2324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325*)
2326  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327  # A ".." for each directory in $ac_dir_suffix.
2328  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329  case $ac_top_builddir_sub in
2330  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332  esac ;;
2333esac
2334ac_abs_top_builddir=$ac_pwd
2335ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336# for backward compatibility:
2337ac_top_builddir=$ac_top_build_prefix
2338
2339case $srcdir in
2340  .)  # We are building in place.
2341    ac_srcdir=.
2342    ac_top_srcdir=$ac_top_builddir_sub
2343    ac_abs_top_srcdir=$ac_pwd ;;
2344  [\\/]* | ?:[\\/]* )  # Absolute name.
2345    ac_srcdir=$srcdir$ac_dir_suffix;
2346    ac_top_srcdir=$srcdir
2347    ac_abs_top_srcdir=$srcdir ;;
2348  *) # Relative name.
2349    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350    ac_top_srcdir=$ac_top_build_prefix$srcdir
2351    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352esac
2353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2354
2355    cd "$ac_dir" || { ac_status=$?; continue; }
2356    # Check for guested configure.
2357    if test -f "$ac_srcdir/configure.gnu"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360    elif test -f "$ac_srcdir/configure"; then
2361      echo &&
2362      $SHELL "$ac_srcdir/configure" --help=recursive
2363    else
2364      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365    fi || ac_status=$?
2366    cd "$ac_pwd" || { ac_status=$?; break; }
2367  done
2368fi
2369
2370test -n "$ac_init_help" && exit $ac_status
2371if $ac_init_version; then
2372  cat <<\_ACEOF
2373OpenJDK configure jdk9
2374generated by GNU Autoconf 2.69
2375
2376Copyright (C) 2012 Free Software Foundation, Inc.
2377This configure script is free software; the Free Software Foundation
2378gives unlimited permission to copy, distribute and modify it.
2379_ACEOF
2380  exit
2381fi
2382
2383## ------------------------ ##
2384## Autoconf initialization. ##
2385## ------------------------ ##
2386
2387# ac_fn_c_try_compile LINENO
2388# --------------------------
2389# Try to compile conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_c_try_compile ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext
2394  if { { ac_try="$ac_compile"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_compile") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_c_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest.$ac_objext; then :
2413  ac_retval=0
2414else
2415  $as_echo "$as_me: failed program was:" >&5
2416sed 's/^/| /' conftest.$ac_ext >&5
2417
2418	ac_retval=1
2419fi
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421  as_fn_set_status $ac_retval
2422
2423} # ac_fn_c_try_compile
2424
2425# ac_fn_cxx_try_compile LINENO
2426# ----------------------------
2427# Try to compile conftest.$ac_ext, and return whether this succeeded.
2428ac_fn_cxx_try_compile ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  rm -f conftest.$ac_objext
2432  if { { ac_try="$ac_compile"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_compile") 2>conftest.err
2440  ac_status=$?
2441  if test -s conftest.err; then
2442    grep -v '^ *+' conftest.err >conftest.er1
2443    cat conftest.er1 >&5
2444    mv -f conftest.er1 conftest.err
2445  fi
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && {
2448	 test -z "$ac_cxx_werror_flag" ||
2449	 test ! -s conftest.err
2450       } && test -s conftest.$ac_objext; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459  as_fn_set_status $ac_retval
2460
2461} # ac_fn_cxx_try_compile
2462
2463# ac_fn_c_try_cpp LINENO
2464# ----------------------
2465# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2466ac_fn_c_try_cpp ()
2467{
2468  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469  if { { ac_try="$ac_cpp conftest.$ac_ext"
2470case "(($ac_try" in
2471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472  *) ac_try_echo=$ac_try;;
2473esac
2474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475$as_echo "$ac_try_echo"; } >&5
2476  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2477  ac_status=$?
2478  if test -s conftest.err; then
2479    grep -v '^ *+' conftest.err >conftest.er1
2480    cat conftest.er1 >&5
2481    mv -f conftest.er1 conftest.err
2482  fi
2483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484  test $ac_status = 0; } > conftest.i && {
2485	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2486	 test ! -s conftest.err
2487       }; then :
2488  ac_retval=0
2489else
2490  $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493    ac_retval=1
2494fi
2495  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496  as_fn_set_status $ac_retval
2497
2498} # ac_fn_c_try_cpp
2499
2500# ac_fn_cxx_try_cpp LINENO
2501# ------------------------
2502# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2503ac_fn_cxx_try_cpp ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if { { ac_try="$ac_cpp conftest.$ac_ext"
2507case "(($ac_try" in
2508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509  *) ac_try_echo=$ac_try;;
2510esac
2511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512$as_echo "$ac_try_echo"; } >&5
2513  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2514  ac_status=$?
2515  if test -s conftest.err; then
2516    grep -v '^ *+' conftest.err >conftest.er1
2517    cat conftest.er1 >&5
2518    mv -f conftest.er1 conftest.err
2519  fi
2520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2521  test $ac_status = 0; } > conftest.i && {
2522	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2523	 test ! -s conftest.err
2524       }; then :
2525  ac_retval=0
2526else
2527  $as_echo "$as_me: failed program was:" >&5
2528sed 's/^/| /' conftest.$ac_ext >&5
2529
2530    ac_retval=1
2531fi
2532  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533  as_fn_set_status $ac_retval
2534
2535} # ac_fn_cxx_try_cpp
2536
2537# ac_fn_c_try_link LINENO
2538# -----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_c_try_link ()
2541{
2542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543  rm -f conftest.$ac_objext conftest$ac_exeext
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>conftest.err
2552  ac_status=$?
2553  if test -s conftest.err; then
2554    grep -v '^ *+' conftest.err >conftest.er1
2555    cat conftest.er1 >&5
2556    mv -f conftest.er1 conftest.err
2557  fi
2558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559  test $ac_status = 0; } && {
2560	 test -z "$ac_c_werror_flag" ||
2561	 test ! -s conftest.err
2562       } && test -s conftest$ac_exeext && {
2563	 test "$cross_compiling" = yes ||
2564	 test -x conftest$ac_exeext
2565       }; then :
2566  ac_retval=0
2567else
2568  $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571	ac_retval=1
2572fi
2573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575  # interfere with the next link command; also delete a directory that is
2576  # left behind by Apple's compiler.  We do this before executing the actions.
2577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579  as_fn_set_status $ac_retval
2580
2581} # ac_fn_c_try_link
2582
2583# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2584# ---------------------------------------------------------
2585# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2586# the include files in INCLUDES and setting the cache variable VAR
2587# accordingly.
2588ac_fn_cxx_check_header_mongrel ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if eval \${$3+:} false; then :
2592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2593$as_echo_n "checking for $2... " >&6; }
2594if eval \${$3+:} false; then :
2595  $as_echo_n "(cached) " >&6
2596fi
2597eval ac_res=\$$3
2598	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599$as_echo "$ac_res" >&6; }
2600else
2601  # Is the header compilable?
2602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2603$as_echo_n "checking $2 usability... " >&6; }
2604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607#include <$2>
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_header_compiler=yes
2611else
2612  ac_header_compiler=no
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2616$as_echo "$ac_header_compiler" >&6; }
2617
2618# Is the header present?
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2620$as_echo_n "checking $2 presence... " >&6; }
2621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h.  */
2623#include <$2>
2624_ACEOF
2625if ac_fn_cxx_try_cpp "$LINENO"; then :
2626  ac_header_preproc=yes
2627else
2628  ac_header_preproc=no
2629fi
2630rm -f conftest.err conftest.i conftest.$ac_ext
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2632$as_echo "$ac_header_preproc" >&6; }
2633
2634# So?  What about this header?
2635case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2636  yes:no: )
2637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2638$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2640$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2641    ;;
2642  no:yes:* )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2644$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2646$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2648$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2650$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653( $as_echo "## ----------------------------------------- ##
2654## Report this to build-dev@openjdk.java.net ##
2655## ----------------------------------------- ##"
2656     ) | sed "s/^/$as_me: WARNING:     /" >&2
2657    ;;
2658esac
2659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660$as_echo_n "checking for $2... " >&6; }
2661if eval \${$3+:} false; then :
2662  $as_echo_n "(cached) " >&6
2663else
2664  eval "$3=\$ac_header_compiler"
2665fi
2666eval ac_res=\$$3
2667	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669fi
2670  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2671
2672} # ac_fn_cxx_check_header_mongrel
2673
2674# ac_fn_cxx_try_run LINENO
2675# ------------------------
2676# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677# that executables *can* be run.
2678ac_fn_cxx_try_run ()
2679{
2680  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681  if { { ac_try="$ac_link"
2682case "(($ac_try" in
2683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684  *) ac_try_echo=$ac_try;;
2685esac
2686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687$as_echo "$ac_try_echo"; } >&5
2688  (eval "$ac_link") 2>&5
2689  ac_status=$?
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692  { { case "(($ac_try" in
2693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694  *) ac_try_echo=$ac_try;;
2695esac
2696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697$as_echo "$ac_try_echo"; } >&5
2698  (eval "$ac_try") 2>&5
2699  ac_status=$?
2700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701  test $ac_status = 0; }; }; then :
2702  ac_retval=0
2703else
2704  $as_echo "$as_me: program exited with status $ac_status" >&5
2705       $as_echo "$as_me: failed program was:" >&5
2706sed 's/^/| /' conftest.$ac_ext >&5
2707
2708       ac_retval=$ac_status
2709fi
2710  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2711  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712  as_fn_set_status $ac_retval
2713
2714} # ac_fn_cxx_try_run
2715
2716# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2717# ---------------------------------------------------------
2718# Tests whether HEADER exists and can be compiled using the include files in
2719# INCLUDES, setting the cache variable VAR accordingly.
2720ac_fn_cxx_check_header_compile ()
2721{
2722  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
2725if eval \${$3+:} false; then :
2726  $as_echo_n "(cached) " >&6
2727else
2728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h.  */
2730$4
2731#include <$2>
2732_ACEOF
2733if ac_fn_cxx_try_compile "$LINENO"; then :
2734  eval "$3=yes"
2735else
2736  eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739fi
2740eval ac_res=\$$3
2741	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742$as_echo "$ac_res" >&6; }
2743  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744
2745} # ac_fn_cxx_check_header_compile
2746
2747# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2748# ----------------------------------------------
2749# Tries to find the compile-time value of EXPR in a program that includes
2750# INCLUDES, setting VAR accordingly. Returns whether the value could be
2751# computed
2752ac_fn_cxx_compute_int ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  if test "$cross_compiling" = yes; then
2756    # Depending upon the size, compute the lo and hi bounds.
2757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758/* end confdefs.h.  */
2759$4
2760int
2761main ()
2762{
2763static int test_array [1 - 2 * !(($2) >= 0)];
2764test_array [0] = 0;
2765return test_array [0];
2766
2767  ;
2768  return 0;
2769}
2770_ACEOF
2771if ac_fn_cxx_try_compile "$LINENO"; then :
2772  ac_lo=0 ac_mid=0
2773  while :; do
2774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775/* end confdefs.h.  */
2776$4
2777int
2778main ()
2779{
2780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781test_array [0] = 0;
2782return test_array [0];
2783
2784  ;
2785  return 0;
2786}
2787_ACEOF
2788if ac_fn_cxx_try_compile "$LINENO"; then :
2789  ac_hi=$ac_mid; break
2790else
2791  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2792			if test $ac_lo -le $ac_mid; then
2793			  ac_lo= ac_hi=
2794			  break
2795			fi
2796			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799  done
2800else
2801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) < 0)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=-1 ac_mid=-1
2817  while :; do
2818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2825test_array [0] = 0;
2826return test_array [0];
2827
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_compile "$LINENO"; then :
2833  ac_lo=$ac_mid; break
2834else
2835  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2836			if test $ac_mid -le $ac_hi; then
2837			  ac_lo= ac_hi=
2838			  break
2839			fi
2840			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843  done
2844else
2845  ac_lo= ac_hi=
2846fi
2847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850# Binary search between lo and hi bounds.
2851while test "x$ac_lo" != "x$ac_hi"; do
2852  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854/* end confdefs.h.  */
2855$4
2856int
2857main ()
2858{
2859static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860test_array [0] = 0;
2861return test_array [0];
2862
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_compile "$LINENO"; then :
2868  ac_hi=$ac_mid
2869else
2870  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873done
2874case $ac_lo in #((
2875?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2876'') ac_retval=1 ;;
2877esac
2878  else
2879    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882static long int longval () { return $2; }
2883static unsigned long int ulongval () { return $2; }
2884#include <stdio.h>
2885#include <stdlib.h>
2886int
2887main ()
2888{
2889
2890  FILE *f = fopen ("conftest.val", "w");
2891  if (! f)
2892    return 1;
2893  if (($2) < 0)
2894    {
2895      long int i = longval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%ld", i);
2899    }
2900  else
2901    {
2902      unsigned long int i = ulongval ();
2903      if (i != ($2))
2904	return 1;
2905      fprintf (f, "%lu", i);
2906    }
2907  /* Do not output a trailing newline, as this causes \r\n confusion
2908     on some platforms.  */
2909  return ferror (f) || fclose (f) != 0;
2910
2911  ;
2912  return 0;
2913}
2914_ACEOF
2915if ac_fn_cxx_try_run "$LINENO"; then :
2916  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2917else
2918  ac_retval=1
2919fi
2920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2921  conftest.$ac_objext conftest.beam conftest.$ac_ext
2922rm -f conftest.val
2923
2924  fi
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926  as_fn_set_status $ac_retval
2927
2928} # ac_fn_cxx_compute_int
2929
2930# ac_fn_cxx_try_link LINENO
2931# -------------------------
2932# Try to link conftest.$ac_ext, and return whether this succeeded.
2933ac_fn_cxx_try_link ()
2934{
2935  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936  rm -f conftest.$ac_objext conftest$ac_exeext
2937  if { { ac_try="$ac_link"
2938case "(($ac_try" in
2939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940  *) ac_try_echo=$ac_try;;
2941esac
2942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943$as_echo "$ac_try_echo"; } >&5
2944  (eval "$ac_link") 2>conftest.err
2945  ac_status=$?
2946  if test -s conftest.err; then
2947    grep -v '^ *+' conftest.err >conftest.er1
2948    cat conftest.er1 >&5
2949    mv -f conftest.er1 conftest.err
2950  fi
2951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2952  test $ac_status = 0; } && {
2953	 test -z "$ac_cxx_werror_flag" ||
2954	 test ! -s conftest.err
2955       } && test -s conftest$ac_exeext && {
2956	 test "$cross_compiling" = yes ||
2957	 test -x conftest$ac_exeext
2958       }; then :
2959  ac_retval=0
2960else
2961  $as_echo "$as_me: failed program was:" >&5
2962sed 's/^/| /' conftest.$ac_ext >&5
2963
2964	ac_retval=1
2965fi
2966  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2967  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2968  # interfere with the next link command; also delete a directory that is
2969  # left behind by Apple's compiler.  We do this before executing the actions.
2970  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2971  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2972  as_fn_set_status $ac_retval
2973
2974} # ac_fn_cxx_try_link
2975
2976# ac_fn_cxx_check_func LINENO FUNC VAR
2977# ------------------------------------
2978# Tests whether FUNC exists, setting the cache variable VAR accordingly
2979ac_fn_cxx_check_func ()
2980{
2981  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2983$as_echo_n "checking for $2... " >&6; }
2984if eval \${$3+:} false; then :
2985  $as_echo_n "(cached) " >&6
2986else
2987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988/* end confdefs.h.  */
2989/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2990   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2991#define $2 innocuous_$2
2992
2993/* System header to define __stub macros and hopefully few prototypes,
2994    which can conflict with char $2 (); below.
2995    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996    <limits.h> exists even on freestanding compilers.  */
2997
2998#ifdef __STDC__
2999# include <limits.h>
3000#else
3001# include <assert.h>
3002#endif
3003
3004#undef $2
3005
3006/* Override any GCC internal prototype to avoid an error.
3007   Use char because int might match the return type of a GCC
3008   builtin and then its argument prototype would still apply.  */
3009#ifdef __cplusplus
3010extern "C"
3011#endif
3012char $2 ();
3013/* The GNU C library defines this for functions which it implements
3014    to always fail with ENOSYS.  Some functions are actually named
3015    something starting with __ and the normal name is an alias.  */
3016#if defined __stub_$2 || defined __stub___$2
3017choke me
3018#endif
3019
3020int
3021main ()
3022{
3023return $2 ();
3024  ;
3025  return 0;
3026}
3027_ACEOF
3028if ac_fn_cxx_try_link "$LINENO"; then :
3029  eval "$3=yes"
3030else
3031  eval "$3=no"
3032fi
3033rm -f core conftest.err conftest.$ac_objext \
3034    conftest$ac_exeext conftest.$ac_ext
3035fi
3036eval ac_res=\$$3
3037	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3038$as_echo "$ac_res" >&6; }
3039  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3040
3041} # ac_fn_cxx_check_func
3042
3043# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3044# -------------------------------------------------------
3045# Tests whether HEADER exists and can be compiled using the include files in
3046# INCLUDES, setting the cache variable VAR accordingly.
3047ac_fn_c_check_header_compile ()
3048{
3049  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3051$as_echo_n "checking for $2... " >&6; }
3052if eval \${$3+:} false; then :
3053  $as_echo_n "(cached) " >&6
3054else
3055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3056/* end confdefs.h.  */
3057$4
3058#include <$2>
3059_ACEOF
3060if ac_fn_c_try_compile "$LINENO"; then :
3061  eval "$3=yes"
3062else
3063  eval "$3=no"
3064fi
3065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3066fi
3067eval ac_res=\$$3
3068	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3069$as_echo "$ac_res" >&6; }
3070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3071
3072} # ac_fn_c_check_header_compile
3073cat >config.log <<_ACEOF
3074This file contains any messages produced by compilers while
3075running configure, to aid debugging if configure makes a mistake.
3076
3077It was created by OpenJDK $as_me jdk9, which was
3078generated by GNU Autoconf 2.69.  Invocation command line was
3079
3080  $ $0 $@
3081
3082_ACEOF
3083exec 5>>config.log
3084{
3085cat <<_ASUNAME
3086## --------- ##
3087## Platform. ##
3088## --------- ##
3089
3090hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3091uname -m = `(uname -m) 2>/dev/null || echo unknown`
3092uname -r = `(uname -r) 2>/dev/null || echo unknown`
3093uname -s = `(uname -s) 2>/dev/null || echo unknown`
3094uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095
3096/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3097/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3098
3099/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3100/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3101/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3102/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3103/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3104/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3105/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3106
3107_ASUNAME
3108
3109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3110for as_dir in $PATH
3111do
3112  IFS=$as_save_IFS
3113  test -z "$as_dir" && as_dir=.
3114    $as_echo "PATH: $as_dir"
3115  done
3116IFS=$as_save_IFS
3117
3118} >&5
3119
3120cat >&5 <<_ACEOF
3121
3122
3123## ----------- ##
3124## Core tests. ##
3125## ----------- ##
3126
3127_ACEOF
3128
3129
3130# Keep a trace of the command line.
3131# Strip out --no-create and --no-recursion so they do not pile up.
3132# Strip out --silent because we don't want to record it for future runs.
3133# Also quote any args containing shell meta-characters.
3134# Make two passes to allow for proper duplicate-argument suppression.
3135ac_configure_args=
3136ac_configure_args0=
3137ac_configure_args1=
3138ac_must_keep_next=false
3139for ac_pass in 1 2
3140do
3141  for ac_arg
3142  do
3143    case $ac_arg in
3144    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3145    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3146    | -silent | --silent | --silen | --sile | --sil)
3147      continue ;;
3148    *\'*)
3149      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    esac
3151    case $ac_pass in
3152    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153    2)
3154      as_fn_append ac_configure_args1 " '$ac_arg'"
3155      if test $ac_must_keep_next = true; then
3156	ac_must_keep_next=false # Got value, back to normal.
3157      else
3158	case $ac_arg in
3159	  *=* | --config-cache | -C | -disable-* | --disable-* \
3160	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3161	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3162	  | -with-* | --with-* | -without-* | --without-* | --x)
3163	    case "$ac_configure_args0 " in
3164	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3165	    esac
3166	    ;;
3167	  -* ) ac_must_keep_next=true ;;
3168	esac
3169      fi
3170      as_fn_append ac_configure_args " '$ac_arg'"
3171      ;;
3172    esac
3173  done
3174done
3175{ ac_configure_args0=; unset ac_configure_args0;}
3176{ ac_configure_args1=; unset ac_configure_args1;}
3177
3178# When interrupted or exit'd, cleanup temporary files, and complete
3179# config.log.  We remove comments because anyway the quotes in there
3180# would cause problems or look ugly.
3181# WARNING: Use '\'' to represent an apostrophe within the trap.
3182# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3183trap 'exit_status=$?
3184  # Save into config.log some information that might help in debugging.
3185  {
3186    echo
3187
3188    $as_echo "## ---------------- ##
3189## Cache variables. ##
3190## ---------------- ##"
3191    echo
3192    # The following way of writing the cache mishandles newlines in values,
3193(
3194  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3195    eval ac_val=\$$ac_var
3196    case $ac_val in #(
3197    *${as_nl}*)
3198      case $ac_var in #(
3199      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3200$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3201      esac
3202      case $ac_var in #(
3203      _ | IFS | as_nl) ;; #(
3204      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3205      *) { eval $ac_var=; unset $ac_var;} ;;
3206      esac ;;
3207    esac
3208  done
3209  (set) 2>&1 |
3210    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3211    *${as_nl}ac_space=\ *)
3212      sed -n \
3213	"s/'\''/'\''\\\\'\'''\''/g;
3214	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3215      ;; #(
3216    *)
3217      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3218      ;;
3219    esac |
3220    sort
3221)
3222    echo
3223
3224    $as_echo "## ----------------- ##
3225## Output variables. ##
3226## ----------------- ##"
3227    echo
3228    for ac_var in $ac_subst_vars
3229    do
3230      eval ac_val=\$$ac_var
3231      case $ac_val in
3232      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3233      esac
3234      $as_echo "$ac_var='\''$ac_val'\''"
3235    done | sort
3236    echo
3237
3238    if test -n "$ac_subst_files"; then
3239      $as_echo "## ------------------- ##
3240## File substitutions. ##
3241## ------------------- ##"
3242      echo
3243      for ac_var in $ac_subst_files
3244      do
3245	eval ac_val=\$$ac_var
3246	case $ac_val in
3247	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248	esac
3249	$as_echo "$ac_var='\''$ac_val'\''"
3250      done | sort
3251      echo
3252    fi
3253
3254    if test -s confdefs.h; then
3255      $as_echo "## ----------- ##
3256## confdefs.h. ##
3257## ----------- ##"
3258      echo
3259      cat confdefs.h
3260      echo
3261    fi
3262    test "$ac_signal" != 0 &&
3263      $as_echo "$as_me: caught signal $ac_signal"
3264    $as_echo "$as_me: exit $exit_status"
3265  } >&5
3266  rm -f core *.core core.conftest.* &&
3267    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3268    exit $exit_status
3269' 0
3270for ac_signal in 1 2 13 15; do
3271  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3272done
3273ac_signal=0
3274
3275# confdefs.h avoids OS command line length limits that DEFS can exceed.
3276rm -f -r conftest* confdefs.h
3277
3278$as_echo "/* confdefs.h */" > confdefs.h
3279
3280# Predefined preprocessor variables.
3281
3282cat >>confdefs.h <<_ACEOF
3283#define PACKAGE_NAME "$PACKAGE_NAME"
3284_ACEOF
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_VERSION "$PACKAGE_VERSION"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_STRING "$PACKAGE_STRING"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_URL "$PACKAGE_URL"
3304_ACEOF
3305
3306
3307# Let the site file select an alternate cache file if it wants to.
3308# Prefer an explicitly selected file to automatically selected ones.
3309ac_site_file1=NONE
3310ac_site_file2=NONE
3311if test -n "$CONFIG_SITE"; then
3312  # We do not want a PATH search for config.site.
3313  case $CONFIG_SITE in #((
3314    -*)  ac_site_file1=./$CONFIG_SITE;;
3315    */*) ac_site_file1=$CONFIG_SITE;;
3316    *)   ac_site_file1=./$CONFIG_SITE;;
3317  esac
3318elif test "x$prefix" != xNONE; then
3319  ac_site_file1=$prefix/share/config.site
3320  ac_site_file2=$prefix/etc/config.site
3321else
3322  ac_site_file1=$ac_default_prefix/share/config.site
3323  ac_site_file2=$ac_default_prefix/etc/config.site
3324fi
3325for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3326do
3327  test "x$ac_site_file" = xNONE && continue
3328  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3329    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3330$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3331    sed 's/^/| /' "$ac_site_file" >&5
3332    . "$ac_site_file" \
3333      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335as_fn_error $? "failed to load site script $ac_site_file
3336See \`config.log' for more details" "$LINENO" 5; }
3337  fi
3338done
3339
3340if test -r "$cache_file"; then
3341  # Some versions of bash will fail to source /dev/null (special files
3342  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3343  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3345$as_echo "$as_me: loading cache $cache_file" >&6;}
3346    case $cache_file in
3347      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3348      *)                      . "./$cache_file";;
3349    esac
3350  fi
3351else
3352  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3353$as_echo "$as_me: creating cache $cache_file" >&6;}
3354  >$cache_file
3355fi
3356
3357# Check that the precious variables saved in the cache have kept the same
3358# value.
3359ac_cache_corrupted=false
3360for ac_var in $ac_precious_vars; do
3361  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3362  eval ac_new_set=\$ac_env_${ac_var}_set
3363  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3364  eval ac_new_val=\$ac_env_${ac_var}_value
3365  case $ac_old_set,$ac_new_set in
3366    set,)
3367      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3368$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3369      ac_cache_corrupted=: ;;
3370    ,set)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,);;
3375    *)
3376      if test "x$ac_old_val" != "x$ac_new_val"; then
3377	# differences in whitespace do not lead to failure.
3378	ac_old_val_w=`echo x $ac_old_val`
3379	ac_new_val_w=`echo x $ac_new_val`
3380	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3381	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3382$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3383	  ac_cache_corrupted=:
3384	else
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3386$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3387	  eval $ac_var=\$ac_old_val
3388	fi
3389	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3390$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3391	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3392$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3393      fi;;
3394  esac
3395  # Pass precious variables to config.status.
3396  if test "$ac_new_set" = set; then
3397    case $ac_new_val in
3398    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3399    *) ac_arg=$ac_var=$ac_new_val ;;
3400    esac
3401    case " $ac_configure_args " in
3402      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3403      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3404    esac
3405  fi
3406done
3407if $ac_cache_corrupted; then
3408  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3411$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3412  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3413fi
3414## -------------------- ##
3415## Main body of script. ##
3416## -------------------- ##
3417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
3423
3424
3425
3426ac_aux_dir=
3427for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3428  if test -f "$ac_dir/install-sh"; then
3429    ac_aux_dir=$ac_dir
3430    ac_install_sh="$ac_aux_dir/install-sh -c"
3431    break
3432  elif test -f "$ac_dir/install.sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install.sh -c"
3435    break
3436  elif test -f "$ac_dir/shtool"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/shtool install -c"
3439    break
3440  fi
3441done
3442if test -z "$ac_aux_dir"; then
3443  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
3444fi
3445
3446# These three variables are undocumented and unsupported,
3447# and are intended to be withdrawn in a future Autoconf release.
3448# They can cause serious problems if a builder's source tree is in a directory
3449# whose full name contains unusual characters.
3450ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3451ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3452ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3453
3454
3455# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3456
3457#
3458# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460#
3461# This code is free software; you can redistribute it and/or modify it
3462# under the terms of the GNU General Public License version 2 only, as
3463# published by the Free Software Foundation.  Oracle designates this
3464# particular file as subject to the "Classpath" exception as provided
3465# by Oracle in the LICENSE file that accompanied this code.
3466#
3467# This code is distributed in the hope that it will be useful, but WITHOUT
3468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470# version 2 for more details (a copy is included in the LICENSE file that
3471# accompanied this code).
3472#
3473# You should have received a copy of the GNU General Public License version
3474# 2 along with this work; if not, write to the Free Software Foundation,
3475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476#
3477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478# or visit www.oracle.com if you need additional information or have any
3479# questions.
3480#
3481
3482#
3483# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3484#
3485# This program is free software; you can redistribute it and/or modify
3486# it under the terms of the GNU General Public License as published by
3487# the Free Software Foundation; either version 2 of the License, or
3488# (at your option) any later version.
3489#
3490# This program is distributed in the hope that it will be useful, but
3491# WITHOUT ANY WARRANTY; without even the implied warranty of
3492# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3493# General Public License for more details.
3494#
3495# You should have received a copy of the GNU General Public License
3496# along with this program; if not, write to the Free Software
3497# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3498#
3499# As a special exception to the GNU General Public License, if you
3500# distribute this file as part of a program that contains a
3501# configuration script generated by Autoconf, you may include it under
3502# the same distribution terms that you use for the rest of that program.
3503
3504# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3505# ----------------------------------
3506# PKG_PROG_PKG_CONFIG
3507
3508# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3509#
3510# Check to see whether a particular set of modules exists.  Similar
3511# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3512#
3513#
3514# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3515# this or PKG_CHECK_MODULES is called, or make sure to call
3516# PKG_CHECK_EXISTS manually
3517# --------------------------------------------------------------
3518
3519
3520
3521# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3522# ---------------------------------------------
3523# _PKG_CONFIG
3524
3525# _PKG_SHORT_ERRORS_SUPPORTED
3526# -----------------------------
3527# _PKG_SHORT_ERRORS_SUPPORTED
3528
3529
3530# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3531# [ACTION-IF-NOT-FOUND])
3532#
3533#
3534# Note that if there is a possibility the first call to
3535# PKG_CHECK_MODULES might not happen, you should be sure to include an
3536# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3537#
3538#
3539# --------------------------------------------------------------
3540# PKG_CHECK_MODULES
3541
3542
3543# Include these first...
3544#
3545# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3546# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547#
3548# This code is free software; you can redistribute it and/or modify it
3549# under the terms of the GNU General Public License version 2 only, as
3550# published by the Free Software Foundation.  Oracle designates this
3551# particular file as subject to the "Classpath" exception as provided
3552# by Oracle in the LICENSE file that accompanied this code.
3553#
3554# This code is distributed in the hope that it will be useful, but WITHOUT
3555# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557# version 2 for more details (a copy is included in the LICENSE file that
3558# accompanied this code).
3559#
3560# You should have received a copy of the GNU General Public License version
3561# 2 along with this work; if not, write to the Free Software Foundation,
3562# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563#
3564# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565# or visit www.oracle.com if you need additional information or have any
3566# questions.
3567#
3568
3569# Create a function/macro that takes a series of named arguments. The call is
3570# similar to AC_DEFUN, but the setup of the function looks like this:
3571# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3572# ... do something
3573#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3574# ])
3575# A star (*) in front of a named argument means that it is required and it's
3576# presence will be verified. To pass e.g. the first value as a normal indexed
3577# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3578# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3579# "ARG_FOO".
3580#
3581# The generated function can be called like this:
3582# MYFUNC(FOO: [foo-val],
3583#     BAR: [
3584#         $ECHO hello world
3585#     ])
3586# Note that the argument value must start on the same line as the argument name.
3587#
3588# Argument 1: Name of the function to define
3589# Argument 2: List of legal named arguments, with a * prefix for required arguments
3590# Argument 3: Argument array to treat as named, typically $@
3591# Argument 4: The main function body
3592
3593
3594# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3595# If so, then append $1 to $2 \
3596# Also set JVM_ARG_OK to true/false depending on outcome.
3597
3598
3599# Appends a string to a path variable, only adding the : when needed.
3600
3601
3602# Prepends a string to a path variable, only adding the : when needed.
3603
3604
3605# This will make sure the given variable points to a full and proper
3606# path. This means:
3607# 1) There will be no spaces in the path. On unix platforms,
3608#    spaces in the path will result in an error. On Windows,
3609#    the path will be rewritten using short-style to be space-free.
3610# 2) The path will be absolute, and it will be in unix-style (on
3611#     cygwin).
3612# $1: The name of the variable to fix
3613
3614
3615# This will make sure the given variable points to a executable
3616# with a full and proper path. This means:
3617# 1) There will be no spaces in the path. On unix platforms,
3618#    spaces in the path will result in an error. On Windows,
3619#    the path will be rewritten using short-style to be space-free.
3620# 2) The path will be absolute, and it will be in unix-style (on
3621#     cygwin).
3622# Any arguments given to the executable is preserved.
3623# If the input variable does not have a directory specification, then
3624# it need to be in the PATH.
3625# $1: The name of the variable to fix
3626
3627
3628
3629
3630# Register a --with argument but mark it as deprecated
3631# $1: The name of the with argument to deprecate, not including --with-
3632
3633
3634# Register a --enable argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --enable-
3636# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3637# $3: Messages to user.
3638
3639
3640
3641
3642# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3643# $1: variable to check
3644
3645
3646# Check that there are no unprocessed overridden variables left.
3647# If so, they are an incorrect argument and we will exit with an error.
3648
3649
3650# Setup a tool for the given variable. If correctly specified by the user,
3651# use that value, otherwise search for the tool using the supplied code snippet.
3652# $1: variable to set
3653# $2: code snippet to call to look for the tool
3654# $3: code snippet to call if variable was used to find tool
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660# $3: [path]
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Like BASIC_PATH_PROGS but fails if no tool was found.
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671# $3: [path]
3672
3673
3674# Like BASIC_SETUP_TOOL but fails if no tool was found.
3675# $1: variable to set
3676# $2: autoconf macro to call to look for the special tool
3677
3678
3679# Setup the most fundamental tools that relies on not much else to set up,
3680# but is used by much of the early bootstrap code.
3681
3682
3683# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684
3685
3686# Evaluates platform specific overrides for devkit variables.
3687# $1: Name of variable
3688
3689
3690
3691
3692
3693
3694#%%% Simple tools %%%
3695
3696# Check if we have found a usable version of make
3697# $1: the path to a potential make binary (or empty)
3698# $2: the description on how we found this
3699
3700
3701
3702
3703# Goes looking for a usable version of GNU make.
3704
3705
3706
3707
3708
3709
3710
3711
3712# Check if build directory is on local disk. If not possible to determine,
3713# we prefer to claim it's local.
3714# Argument 1: directory to test
3715# Argument 2: what to do if it is on local disk
3716# Argument 3: what to do otherwise (remote disk or failure)
3717
3718
3719# Check that source files have basic read permissions set. This might
3720# not be the case in cygwin in certain conditions.
3721
3722
3723
3724
3725# Check for support for specific options in bash
3726
3727
3728################################################################################
3729#
3730# Default make target
3731#
3732
3733
3734# Code to run after AC_OUTPUT
3735
3736
3737#
3738# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3740#
3741# This code is free software; you can redistribute it and/or modify it
3742# under the terms of the GNU General Public License version 2 only, as
3743# published by the Free Software Foundation.  Oracle designates this
3744# particular file as subject to the "Classpath" exception as provided
3745# by Oracle in the LICENSE file that accompanied this code.
3746#
3747# This code is distributed in the hope that it will be useful, but WITHOUT
3748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3750# version 2 for more details (a copy is included in the LICENSE file that
3751# accompanied this code).
3752#
3753# You should have received a copy of the GNU General Public License version
3754# 2 along with this work; if not, write to the Free Software Foundation,
3755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3756#
3757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3758# or visit www.oracle.com if you need additional information or have any
3759# questions.
3760#
3761
3762
3763
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# Helper function which possibly converts a path using DOS-style short mode.
3772# If so, the updated path is stored in $new_path.
3773# $1: The path to check
3774
3775
3776# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3777# and could probably be heavily simplified. However, all changes in this
3778# area tend to need lot of testing in different scenarios, and in lack of
3779# proper unit testing, cleaning this up has not been deemed worth the effort
3780# at the moment.
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3791
3792
3793
3794
3795# ... then the rest
3796#
3797# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3798# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3799#
3800# This code is free software; you can redistribute it and/or modify it
3801# under the terms of the GNU General Public License version 2 only, as
3802# published by the Free Software Foundation.  Oracle designates this
3803# particular file as subject to the "Classpath" exception as provided
3804# by Oracle in the LICENSE file that accompanied this code.
3805#
3806# This code is distributed in the hope that it will be useful, but WITHOUT
3807# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3808# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3809# version 2 for more details (a copy is included in the LICENSE file that
3810# accompanied this code).
3811#
3812# You should have received a copy of the GNU General Public License version
3813# 2 along with this work; if not, write to the Free Software Foundation,
3814# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3815#
3816# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3817# or visit www.oracle.com if you need additional information or have any
3818# questions.
3819#
3820
3821########################################################################
3822# This file handles detection of the Boot JDK. The Boot JDK detection
3823# process has been developed as a response to solve a complex real-world
3824# problem. Initially, it was simple, but it has grown as platform after
3825# platform, idiosyncracy after idiosyncracy has been supported.
3826#
3827# The basic idea is this:
3828# 1) You need an acceptable *) JDK to use as a Boot JDK
3829# 2) There are several ways to locate a JDK, that are mostly platform
3830#    dependent **)
3831# 3) You can have multiple JDKs installed
3832# 4) If possible, configure should try to dig out an acceptable JDK
3833#    automatically, without having to resort to command-line options
3834#
3835# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3836#     javac) and not a JRE, etc.
3837#
3838# **) On Windows we typically use a well-known path.
3839#     On MacOSX we typically use the tool java_home.
3840#     On Linux we typically find javac in the $PATH, and then follow a
3841#     chain of symlinks that often ends up in a real JDK.
3842#
3843# This leads to the code where we check in different ways to locate a
3844# JDK, and if one is found, check if it is acceptable. If not, we print
3845# our reasons for rejecting it (useful when debugging non-working
3846# configure situations) and continue checking the next one.
3847########################################################################
3848
3849# Execute the check given as argument, and verify the result
3850# If the Boot JDK was previously found, do nothing
3851# $1 A command line (typically autoconf macro) to execute
3852
3853
3854# Test: Is bootjdk explicitely set by command line arguments?
3855
3856
3857# Test: Is $JAVA_HOME set?
3858
3859
3860# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3861
3862
3863# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3864# $1: Argument to the java_home binary (optional)
3865
3866
3867# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3868
3869
3870# Look for a jdk in the given path. If there are multiple, try to select the newest.
3871# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3872# $1 = Path to directory containing jdk installations.
3873# $2 = String to append to the found JDK directory to get the proper JDK home
3874
3875
3876# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3877# environmental variable as base for where to look.
3878# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3879
3880
3881# Test: Is there a JDK installed in default, well-known locations?
3882
3883
3884# Check that a command-line tool in the Boot JDK is correct
3885# $1 = name of variable to assign
3886# $2 = name of binary
3887
3888
3889###############################################################################
3890#
3891# We need a Boot JDK to bootstrap the build.
3892#
3893
3894
3895
3896
3897
3898# BUILD_JDK: the location of the latest JDK that can run
3899#   on the host system and supports the target class file version
3900#   generated in this JDK build.  This variable should only be
3901#   used after the launchers are built.
3902#
3903
3904# Execute the check given as argument, and verify the result.
3905# If the JDK was previously found, do nothing.
3906# $1 A command line (typically autoconf macro) to execute
3907
3908
3909# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3910# is different than the host system doing the build (e.g. cross-compilation),
3911# a special BUILD_JDK is built as part of the build process.  An external
3912# prebuilt BUILD_JDK can also be supplied.
3913
3914
3915#
3916# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3917# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3918#
3919# This code is free software; you can redistribute it and/or modify it
3920# under the terms of the GNU General Public License version 2 only, as
3921# published by the Free Software Foundation.  Oracle designates this
3922# particular file as subject to the "Classpath" exception as provided
3923# by Oracle in the LICENSE file that accompanied this code.
3924#
3925# This code is distributed in the hope that it will be useful, but WITHOUT
3926# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3927# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3928# version 2 for more details (a copy is included in the LICENSE file that
3929# accompanied this code).
3930#
3931# You should have received a copy of the GNU General Public License version
3932# 2 along with this work; if not, write to the Free Software Foundation,
3933# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3934#
3935# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3936# or visit www.oracle.com if you need additional information or have any
3937# questions.
3938#
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956################################################################################
3957#
3958# Runs icecc-create-env once and prints the error if it fails
3959#
3960# $1: arguments to icecc-create-env
3961# $2: log file
3962#
3963
3964
3965################################################################################
3966#
3967# Optionally enable distributed compilation of native code using icecc/icecream
3968#
3969
3970
3971
3972
3973
3974
3975
3976#
3977# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3978# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3979#
3980# This code is free software; you can redistribute it and/or modify it
3981# under the terms of the GNU General Public License version 2 only, as
3982# published by the Free Software Foundation.  Oracle designates this
3983# particular file as subject to the "Classpath" exception as provided
3984# by Oracle in the LICENSE file that accompanied this code.
3985#
3986# This code is distributed in the hope that it will be useful, but WITHOUT
3987# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3988# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3989# version 2 for more details (a copy is included in the LICENSE file that
3990# accompanied this code).
3991#
3992# You should have received a copy of the GNU General Public License version
3993# 2 along with this work; if not, write to the Free Software Foundation,
3994# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3995#
3996# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3997# or visit www.oracle.com if you need additional information or have any
3998# questions.
3999#
4000
4001# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4002# corresponding configure arguments instead
4003
4004
4005# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4006# that configure can use them while detecting compilers.
4007# TOOLCHAIN_TYPE is available here.
4008# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4009
4010
4011
4012
4013
4014
4015# Documentation on common flags used for solstudio in HIGHEST.
4016#
4017# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4018#          done with care, there are some assumptions below that need to
4019#          be understood about the use of pointers, and IEEE behavior.
4020#
4021# -fns: Use non-standard floating point mode (not IEEE 754)
4022# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4023# -fsingle: Use single precision floating point with 'float'
4024# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4025#   (Source with excessing pointer casting and data access with mixed
4026#    pointer types are not recommended)
4027# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4028#   (If you expect perfect errno behavior, do not use this)
4029# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4030# -xrestrict: Pointer parameters to functions do not overlap
4031#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4032#    If you pass in multiple pointers to the same data, do not use this)
4033# -xlibmil: Inline some library routines
4034#   (If you expect perfect errno behavior, do not use this)
4035# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4036#   (If you expect perfect errno behavior, do not use this)
4037#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4038
4039    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4040    # Bug?
4041    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4042    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4043    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4044    #fi
4045
4046
4047
4048
4049
4050
4051################################################################################
4052# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4053#      conditionals against.
4054# $2 - Optional prefix for each variable defined.
4055
4056
4057# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4058#                                  IF_FALSE: [RUN-IF-FALSE])
4059# ------------------------------------------------------------
4060# Check that the C compiler supports an argument
4061
4062
4063
4064
4065# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4066#                                    IF_FALSE: [RUN-IF-FALSE])
4067# ------------------------------------------------------------
4068# Check that the C++ compiler supports an argument
4069
4070
4071
4072
4073# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4074#                                IF_FALSE: [RUN-IF-FALSE])
4075# ------------------------------------------------------------
4076# Check that the C and C++ compilers support an argument
4077
4078
4079
4080
4081# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4082#                                   IF_FALSE: [RUN-IF-FALSE])
4083# ------------------------------------------------------------
4084# Check that the linker support an argument
4085
4086
4087
4088
4089
4090
4091# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4092# Arguments:
4093# $1 - Optional prefix for each variable defined.
4094
4095
4096#
4097# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4098# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4099#
4100# This code is free software; you can redistribute it and/or modify it
4101# under the terms of the GNU General Public License version 2 only, as
4102# published by the Free Software Foundation.  Oracle designates this
4103# particular file as subject to the "Classpath" exception as provided
4104# by Oracle in the LICENSE file that accompanied this code.
4105#
4106# This code is distributed in the hope that it will be useful, but WITHOUT
4107# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4108# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4109# version 2 for more details (a copy is included in the LICENSE file that
4110# accompanied this code).
4111#
4112# You should have received a copy of the GNU General Public License version
4113# 2 along with this work; if not, write to the Free Software Foundation,
4114# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4115#
4116# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4117# or visit www.oracle.com if you need additional information or have any
4118# questions.
4119#
4120
4121
4122
4123
4124
4125cygwin_help() {
4126  case $1 in
4127    unzip)
4128      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130      ;;
4131    zip)
4132      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4133      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4134      ;;
4135    make)
4136      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4137      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4138      ;;
4139    freetype)
4140      HELP_MSG="
4141The freetype library can now be build during the configure process.
4142Download the freetype sources and unpack them into an arbitrary directory:
4143
4144wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4145tar -xzf freetype-2.5.3.tar.gz
4146
4147Then run configure with '--with-freetype-src=<freetype_src>'. This will
4148automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4149builds or into '<freetype_src>/lib32' for 32-bit builds.
4150Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4151and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4152
4153Alternatively you can unpack the sources like this to use the default directory:
4154
4155tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4156      ;;
4157  esac
4158}
4159
4160msys_help() {
4161  PKGHANDLER_COMMAND=""
4162}
4163
4164apt_help() {
4165  case $1 in
4166    reduced)
4167      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4168    devkit)
4169      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4170    openjdk)
4171      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4172    alsa)
4173      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4174    cups)
4175      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4176    freetype)
4177      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4178    ffi)
4179      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4180    x11)
4181      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4182    ccache)
4183      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4184    dtrace)
4185      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4186  esac
4187}
4188
4189yum_help() {
4190  case $1 in
4191    devkit)
4192      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4193    openjdk)
4194      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4195    alsa)
4196      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4197    cups)
4198      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4199    freetype)
4200      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4201    x11)
4202      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4203    ccache)
4204      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4205  esac
4206}
4207
4208port_help() {
4209  PKGHANDLER_COMMAND=""
4210}
4211
4212pkgutil_help() {
4213  PKGHANDLER_COMMAND=""
4214}
4215
4216pkgadd_help() {
4217  PKGHANDLER_COMMAND=""
4218}
4219
4220# This function will check if we're called from the "configure" wrapper while
4221# printing --help. If so, we will print out additional information that can
4222# only be extracted within the autoconf script, and then exit. This must be
4223# called at the very beginning in configure.ac.
4224
4225
4226
4227
4228
4229
4230#
4231# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4232# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4233#
4234# This code is free software; you can redistribute it and/or modify it
4235# under the terms of the GNU General Public License version 2 only, as
4236# published by the Free Software Foundation.  Oracle designates this
4237# particular file as subject to the "Classpath" exception as provided
4238# by Oracle in the LICENSE file that accompanied this code.
4239#
4240# This code is distributed in the hope that it will be useful, but WITHOUT
4241# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4242# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4243# version 2 for more details (a copy is included in the LICENSE file that
4244# accompanied this code).
4245#
4246# You should have received a copy of the GNU General Public License version
4247# 2 along with this work; if not, write to the Free Software Foundation,
4248# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4249#
4250# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4251# or visit www.oracle.com if you need additional information or have any
4252# questions.
4253#
4254
4255# All valid JVM features, regardless of platform
4256VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4257    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4258
4259# All valid JVM variants
4260VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4261
4262###############################################################################
4263# Check if the specified JVM variant should be built. To be used in shell if
4264# constructs, like this:
4265# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4266#
4267# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4268
4269# Definition kept in one line to allow inlining in if statements.
4270# Additional [] needed to keep m4 from mangling shell constructs.
4271
4272
4273###############################################################################
4274# Check if the specified JVM features are explicitly enabled. To be used in
4275# shell if constructs, like this:
4276# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4277#
4278# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4279
4280# Definition kept in one line to allow inlining in if statements.
4281# Additional [] needed to keep m4 from mangling shell constructs.
4282
4283
4284###############################################################################
4285# Check which variants of the JVM that we want to build. Available variants are:
4286#   server: normal interpreter, and a tiered C1/C2 compiler
4287#   client: normal interpreter, and C1 (no C2 compiler)
4288#   minimal: reduced form of client with optional features stripped out
4289#   core: normal interpreter only, no compiler
4290#   zero: C++ based interpreter only, no compiler
4291#   zeroshark: C++ based interpreter, and a llvm-based compiler
4292#   custom: baseline JVM with no default features
4293#
4294
4295
4296###############################################################################
4297# Check if dtrace should be enabled and has all prerequisites present.
4298#
4299
4300
4301###############################################################################
4302# Set up all JVM features for each JVM variant.
4303#
4304
4305
4306###############################################################################
4307# Validate JVM features once all setup is complete, including custom setup.
4308#
4309
4310
4311################################################################################
4312# Check if gtest should be built
4313#
4314
4315
4316#
4317# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4318# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4319#
4320# This code is free software; you can redistribute it and/or modify it
4321# under the terms of the GNU General Public License version 2 only, as
4322# published by the Free Software Foundation.  Oracle designates this
4323# particular file as subject to the "Classpath" exception as provided
4324# by Oracle in the LICENSE file that accompanied this code.
4325#
4326# This code is distributed in the hope that it will be useful, but WITHOUT
4327# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4328# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4329# version 2 for more details (a copy is included in the LICENSE file that
4330# accompanied this code).
4331#
4332# You should have received a copy of the GNU General Public License version
4333# 2 along with this work; if not, write to the Free Software Foundation,
4334# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4335#
4336# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4337# or visit www.oracle.com if you need additional information or have any
4338# questions.
4339#
4340
4341###############################################################################
4342# Check which variant of the JDK that we want to build.
4343# Currently we have:
4344#    normal:   standard edition
4345# but the custom make system may add other variants
4346#
4347# Effectively the JDK variant gives a name to a specific set of
4348# modules to compile into the JDK.
4349
4350
4351###############################################################################
4352# Set the debug level
4353#    release: no debug information, all optimizations, no asserts.
4354#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4355#    fastdebug: debug information (-g), all optimizations, all asserts
4356#    slowdebug: debug information (-g), no optimizations, all asserts
4357
4358
4359###############################################################################
4360#
4361# Should we build only OpenJDK even if closed sources are present?
4362#
4363
4364
4365
4366
4367###############################################################################
4368#
4369# Enable or disable the elliptic curve crypto implementation
4370#
4371
4372
4373
4374
4375################################################################################
4376#
4377# Gcov coverage data for hotspot
4378#
4379
4380
4381################################################################################
4382#
4383# Static build support.  When enabled will generate static
4384# libraries instead of shared libraries for all JDK libs.
4385#
4386
4387
4388################################################################################
4389#
4390# jlink options.
4391# We always keep packaged modules in JDK image.
4392#
4393
4394
4395################################################################################
4396#
4397# Check if building of the jtreg failure handler should be enabled.
4398#
4399
4400
4401################################################################################
4402#
4403# Enable or disable generation of the classlist at build time
4404#
4405
4406
4407#
4408# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4409# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4410#
4411# This code is free software; you can redistribute it and/or modify it
4412# under the terms of the GNU General Public License version 2 only, as
4413# published by the Free Software Foundation.  Oracle designates this
4414# particular file as subject to the "Classpath" exception as provided
4415# by Oracle in the LICENSE file that accompanied this code.
4416#
4417# This code is distributed in the hope that it will be useful, but WITHOUT
4418# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4419# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4420# version 2 for more details (a copy is included in the LICENSE file that
4421# accompanied this code).
4422#
4423# You should have received a copy of the GNU General Public License version
4424# 2 along with this work; if not, write to the Free Software Foundation,
4425# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4426#
4427# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4428# or visit www.oracle.com if you need additional information or have any
4429# questions.
4430#
4431
4432###############################################################################
4433#
4434# Setup version numbers
4435#
4436
4437# Verify that a given string represents a valid version number, and assign it
4438# to a variable.
4439
4440# Argument 1: the variable to assign to
4441# Argument 2: the value given by the user
4442
4443
4444
4445
4446#
4447# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4448# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4449#
4450# This code is free software; you can redistribute it and/or modify it
4451# under the terms of the GNU General Public License version 2 only, as
4452# published by the Free Software Foundation.  Oracle designates this
4453# particular file as subject to the "Classpath" exception as provided
4454# by Oracle in the LICENSE file that accompanied this code.
4455#
4456# This code is distributed in the hope that it will be useful, but WITHOUT
4457# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4458# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4459# version 2 for more details (a copy is included in the LICENSE file that
4460# accompanied this code).
4461#
4462# You should have received a copy of the GNU General Public License version
4463# 2 along with this work; if not, write to the Free Software Foundation,
4464# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4465#
4466# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4467# or visit www.oracle.com if you need additional information or have any
4468# questions.
4469#
4470
4471# Major library component reside in separate files.
4472#
4473# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4474# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4475#
4476# This code is free software; you can redistribute it and/or modify it
4477# under the terms of the GNU General Public License version 2 only, as
4478# published by the Free Software Foundation.  Oracle designates this
4479# particular file as subject to the "Classpath" exception as provided
4480# by Oracle in the LICENSE file that accompanied this code.
4481#
4482# This code is distributed in the hope that it will be useful, but WITHOUT
4483# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4484# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4485# version 2 for more details (a copy is included in the LICENSE file that
4486# accompanied this code).
4487#
4488# You should have received a copy of the GNU General Public License version
4489# 2 along with this work; if not, write to the Free Software Foundation,
4490# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4491#
4492# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4493# or visit www.oracle.com if you need additional information or have any
4494# questions.
4495#
4496
4497################################################################################
4498# Setup alsa (Advanced Linux Sound Architecture)
4499################################################################################
4500
4501
4502#
4503# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4505#
4506# This code is free software; you can redistribute it and/or modify it
4507# under the terms of the GNU General Public License version 2 only, as
4508# published by the Free Software Foundation.  Oracle designates this
4509# particular file as subject to the "Classpath" exception as provided
4510# by Oracle in the LICENSE file that accompanied this code.
4511#
4512# This code is distributed in the hope that it will be useful, but WITHOUT
4513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4515# version 2 for more details (a copy is included in the LICENSE file that
4516# accompanied this code).
4517#
4518# You should have received a copy of the GNU General Public License version
4519# 2 along with this work; if not, write to the Free Software Foundation,
4520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4521#
4522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4523# or visit www.oracle.com if you need additional information or have any
4524# questions.
4525#
4526
4527################################################################################
4528# Setup bundled libraries.
4529#
4530# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4531# OpenJDK repository. Default is to use these libraries as bundled, but they
4532# might be replaced by en external version by the user.
4533################################################################################
4534
4535
4536################################################################################
4537# Setup libjpeg
4538################################################################################
4539
4540
4541################################################################################
4542# Setup giflib
4543################################################################################
4544
4545
4546################################################################################
4547# Setup libpng
4548################################################################################
4549
4550
4551################################################################################
4552# Setup zlib
4553################################################################################
4554
4555
4556################################################################################
4557# Setup lcms (Little CMS)
4558################################################################################
4559
4560
4561#
4562# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4564#
4565# This code is free software; you can redistribute it and/or modify it
4566# under the terms of the GNU General Public License version 2 only, as
4567# published by the Free Software Foundation.  Oracle designates this
4568# particular file as subject to the "Classpath" exception as provided
4569# by Oracle in the LICENSE file that accompanied this code.
4570#
4571# This code is distributed in the hope that it will be useful, but WITHOUT
4572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4574# version 2 for more details (a copy is included in the LICENSE file that
4575# accompanied this code).
4576#
4577# You should have received a copy of the GNU General Public License version
4578# 2 along with this work; if not, write to the Free Software Foundation,
4579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4580#
4581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4582# or visit www.oracle.com if you need additional information or have any
4583# questions.
4584#
4585
4586################################################################################
4587# Setup cups (Common Unix Printing System)
4588################################################################################
4589
4590
4591#
4592# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4593# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4594#
4595# This code is free software; you can redistribute it and/or modify it
4596# under the terms of the GNU General Public License version 2 only, as
4597# published by the Free Software Foundation.  Oracle designates this
4598# particular file as subject to the "Classpath" exception as provided
4599# by Oracle in the LICENSE file that accompanied this code.
4600#
4601# This code is distributed in the hope that it will be useful, but WITHOUT
4602# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4603# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4604# version 2 for more details (a copy is included in the LICENSE file that
4605# accompanied this code).
4606#
4607# You should have received a copy of the GNU General Public License version
4608# 2 along with this work; if not, write to the Free Software Foundation,
4609# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4610#
4611# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4612# or visit www.oracle.com if you need additional information or have any
4613# questions.
4614#
4615
4616################################################################################
4617# Setup libffi (Foreign Function Interface)
4618################################################################################
4619
4620
4621#
4622# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4623# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4624#
4625# This code is free software; you can redistribute it and/or modify it
4626# under the terms of the GNU General Public License version 2 only, as
4627# published by the Free Software Foundation.  Oracle designates this
4628# particular file as subject to the "Classpath" exception as provided
4629# by Oracle in the LICENSE file that accompanied this code.
4630#
4631# This code is distributed in the hope that it will be useful, but WITHOUT
4632# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4633# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4634# version 2 for more details (a copy is included in the LICENSE file that
4635# accompanied this code).
4636#
4637# You should have received a copy of the GNU General Public License version
4638# 2 along with this work; if not, write to the Free Software Foundation,
4639# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4640#
4641# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4642# or visit www.oracle.com if you need additional information or have any
4643# questions.
4644#
4645
4646################################################################################
4647# Build the freetype lib from source
4648################################################################################
4649
4650
4651################################################################################
4652# Check if a potential freeype library match is correct and usable
4653################################################################################
4654
4655
4656################################################################################
4657# Setup freetype (The FreeType2 font rendering library)
4658################################################################################
4659
4660
4661#
4662# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4663# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4664#
4665# This code is free software; you can redistribute it and/or modify it
4666# under the terms of the GNU General Public License version 2 only, as
4667# published by the Free Software Foundation.  Oracle designates this
4668# particular file as subject to the "Classpath" exception as provided
4669# by Oracle in the LICENSE file that accompanied this code.
4670#
4671# This code is distributed in the hope that it will be useful, but WITHOUT
4672# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4673# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4674# version 2 for more details (a copy is included in the LICENSE file that
4675# accompanied this code).
4676#
4677# You should have received a copy of the GNU General Public License version
4678# 2 along with this work; if not, write to the Free Software Foundation,
4679# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4680#
4681# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4682# or visit www.oracle.com if you need additional information or have any
4683# questions.
4684#
4685
4686################################################################################
4687# Setup the standard C/C++ runtime libraries.
4688#
4689# Most importantly, determine if stdc++ should be linked statically or
4690# dynamically.
4691################################################################################
4692
4693
4694#
4695# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4696# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4697#
4698# This code is free software; you can redistribute it and/or modify it
4699# under the terms of the GNU General Public License version 2 only, as
4700# published by the Free Software Foundation.  Oracle designates this
4701# particular file as subject to the "Classpath" exception as provided
4702# by Oracle in the LICENSE file that accompanied this code.
4703#
4704# This code is distributed in the hope that it will be useful, but WITHOUT
4705# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4706# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4707# version 2 for more details (a copy is included in the LICENSE file that
4708# accompanied this code).
4709#
4710# You should have received a copy of the GNU General Public License version
4711# 2 along with this work; if not, write to the Free Software Foundation,
4712# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4713#
4714# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4715# or visit www.oracle.com if you need additional information or have any
4716# questions.
4717#
4718
4719################################################################################
4720# Setup X11 Windows system
4721################################################################################
4722
4723
4724
4725################################################################################
4726# Determine which libraries are needed for this configuration
4727################################################################################
4728
4729
4730################################################################################
4731# Parse library options, and setup needed libraries
4732################################################################################
4733
4734
4735################################################################################
4736# Setup llvm (Low-Level VM)
4737################################################################################
4738
4739
4740################################################################################
4741# Setup various libraries, typically small system libraries
4742################################################################################
4743
4744
4745################################################################################
4746# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4747# redistribute it in the test image.
4748################################################################################
4749
4750
4751
4752#
4753# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4755#
4756# This code is free software; you can redistribute it and/or modify it
4757# under the terms of the GNU General Public License version 2 only, as
4758# published by the Free Software Foundation.  Oracle designates this
4759# particular file as subject to the "Classpath" exception as provided
4760# by Oracle in the LICENSE file that accompanied this code.
4761#
4762# This code is distributed in the hope that it will be useful, but WITHOUT
4763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4765# version 2 for more details (a copy is included in the LICENSE file that
4766# accompanied this code).
4767#
4768# You should have received a copy of the GNU General Public License version
4769# 2 along with this work; if not, write to the Free Software Foundation,
4770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4771#
4772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4773# or visit www.oracle.com if you need additional information or have any
4774# questions.
4775#
4776
4777# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4778# Converts autoconf style CPU name to OpenJDK style, into
4779# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4780
4781
4782# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4783# Converts autoconf style OS name to OpenJDK style, into
4784# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4785
4786
4787# Expects $host_os $host_cpu $build_os and $build_cpu
4788# and $with_target_bits to have been setup!
4789#
4790# Translate the standard triplet(quadruplet) definition
4791# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4792# OPENJDK_BUILD_OS, etc.
4793
4794
4795# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4796# accordingly. Must be done after setting up build and target system, but before
4797# doing anything else with these values.
4798
4799
4800# Setup the legacy variables, for controlling the old makefiles.
4801#
4802
4803
4804# $1 - Either TARGET or BUILD to setup the variables for.
4805
4806
4807
4808
4809#%%% Build and target systems %%%
4810
4811
4812
4813
4814# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4815# Add -mX to various FLAGS variables.
4816
4817
4818
4819
4820
4821
4822#
4823# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4824# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4825#
4826# This code is free software; you can redistribute it and/or modify it
4827# under the terms of the GNU General Public License version 2 only, as
4828# published by the Free Software Foundation.  Oracle designates this
4829# particular file as subject to the "Classpath" exception as provided
4830# by Oracle in the LICENSE file that accompanied this code.
4831#
4832# This code is distributed in the hope that it will be useful, but WITHOUT
4833# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4834# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4835# version 2 for more details (a copy is included in the LICENSE file that
4836# accompanied this code).
4837#
4838# You should have received a copy of the GNU General Public License version
4839# 2 along with this work; if not, write to the Free Software Foundation,
4840# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4841#
4842# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4843# or visit www.oracle.com if you need additional information or have any
4844# questions.
4845#
4846
4847
4848
4849
4850
4851
4852
4853################################################################################
4854# Define a mechanism for importing extra prebuilt modules
4855#
4856
4857
4858
4859#
4860# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4861# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4862#
4863# This code is free software; you can redistribute it and/or modify it
4864# under the terms of the GNU General Public License version 2 only, as
4865# published by the Free Software Foundation.  Oracle designates this
4866# particular file as subject to the "Classpath" exception as provided
4867# by Oracle in the LICENSE file that accompanied this code.
4868#
4869# This code is distributed in the hope that it will be useful, but WITHOUT
4870# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4871# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4872# version 2 for more details (a copy is included in the LICENSE file that
4873# accompanied this code).
4874#
4875# You should have received a copy of the GNU General Public License version
4876# 2 along with this work; if not, write to the Free Software Foundation,
4877# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4878#
4879# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4880# or visit www.oracle.com if you need additional information or have any
4881# questions.
4882#
4883
4884########################################################################
4885# This file is responsible for detecting, verifying and setting up the
4886# toolchain, i.e. the compiler, linker and related utilities. It will setup
4887# proper paths to the binaries, but it will not setup any flags.
4888#
4889# The binaries used is determined by the toolchain type, which is the family of
4890# compilers and related tools that are used.
4891########################################################################
4892
4893
4894# All valid toolchains, regardless of platform (used by help.m4)
4895VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4896
4897# These toolchains are valid on different platforms
4898VALID_TOOLCHAINS_linux="gcc clang"
4899VALID_TOOLCHAINS_solaris="solstudio"
4900VALID_TOOLCHAINS_macosx="gcc clang"
4901VALID_TOOLCHAINS_aix="xlc"
4902VALID_TOOLCHAINS_windows="microsoft"
4903
4904# Toolchain descriptions
4905TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4906TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4907TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4908TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4909TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4910
4911# Minimum supported versions, empty means unspecified
4912TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4913TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4914TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4915TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4916TOOLCHAIN_MINIMUM_VERSION_xlc=""
4917
4918# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4919# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4920# $1 - optional variable prefix for compiler and version variables (BUILD_)
4921# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4922
4923
4924# Check if the configured compiler (C and C++) is of a specific version or
4925# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4926#
4927# Arguments:
4928#   VERSION:   The version string to check against the found version
4929#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4930#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4931#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4932
4933
4934
4935
4936# Setup a number of variables describing how native output files are
4937# named on this platform/toolchain.
4938
4939
4940# Determine which toolchain type to use, and make sure it is valid for this
4941# platform. Setup various information about the selected toolchain.
4942
4943
4944# Before we start detecting the toolchain executables, we might need some
4945# special setup, e.g. additional paths etc.
4946
4947
4948# Restore path, etc
4949
4950
4951# Check if a compiler is of the toolchain type we expect, and save the version
4952# information from it. If the compiler does not match the expected type,
4953# this function will abort using AC_MSG_ERROR. If it matches, the version will
4954# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4955# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4956#
4957# $1 = compiler to test (CC or CXX)
4958# $2 = human readable name of compiler (C or C++)
4959
4960
4961# Try to locate the given C or C++ compiler in the path, or otherwise.
4962#
4963# $1 = compiler to test (CC or CXX)
4964# $2 = human readable name of compiler (C or C++)
4965# $3 = list of compiler names to search for
4966
4967
4968# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4969# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4970# archiver (AR). Verify that the compilers are correct according to the
4971# toolchain type.
4972
4973
4974# Setup additional tools that is considered a part of the toolchain, but not the
4975# core part. Many of these are highly platform-specific and do not exist,
4976# and/or are not needed on all platforms.
4977
4978
4979# Setup the build tools (i.e, the compiler and linker used to build programs
4980# that should be run on the build platform, not the target platform, as a build
4981# helper). Since the non-cross-compile case uses the normal, target compilers
4982# for this, we can only do this after these have been setup.
4983
4984
4985# Setup legacy variables that are still needed as alternative ways to refer to
4986# parts of the toolchain.
4987
4988
4989# Do some additional checks on the detected tools.
4990
4991
4992# Setup the JTReg Regression Test Harness.
4993
4994
4995#
4996# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4997# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4998#
4999# This code is free software; you can redistribute it and/or modify it
5000# under the terms of the GNU General Public License version 2 only, as
5001# published by the Free Software Foundation.  Oracle designates this
5002# particular file as subject to the "Classpath" exception as provided
5003# by Oracle in the LICENSE file that accompanied this code.
5004#
5005# This code is distributed in the hope that it will be useful, but WITHOUT
5006# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5007# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5008# version 2 for more details (a copy is included in the LICENSE file that
5009# accompanied this code).
5010#
5011# You should have received a copy of the GNU General Public License version
5012# 2 along with this work; if not, write to the Free Software Foundation,
5013# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5014#
5015# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5016# or visit www.oracle.com if you need additional information or have any
5017# questions.
5018#
5019
5020################################################################################
5021# The order of these defines the priority by which we try to find them.
5022VALID_VS_VERSIONS="2013 2012 2010"
5023
5024VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5025VS_VERSION_INTERNAL_2010=100
5026VS_MSVCR_2010=msvcr100.dll
5027# We don't use msvcp on Visual Studio 2010
5028#VS_MSVCP_2010=msvcp100.dll
5029VS_ENVVAR_2010="VS100COMNTOOLS"
5030VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5031VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5032VS_VS_PLATFORM_NAME_2010="v100"
5033VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5034
5035VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5036VS_VERSION_INTERNAL_2012=110
5037VS_MSVCR_2012=msvcr110.dll
5038VS_MSVCP_2012=msvcp110.dll
5039VS_ENVVAR_2012="VS110COMNTOOLS"
5040VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5041VS_SDK_INSTALLDIR_2012=
5042VS_VS_PLATFORM_NAME_2012="v110"
5043VS_SDK_PLATFORM_NAME_2012=
5044
5045VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5046VS_VERSION_INTERNAL_2013=120
5047VS_MSVCR_2013=msvcr120.dll
5048VS_MSVCP_2013=msvcp120.dll
5049VS_ENVVAR_2013="VS120COMNTOOLS"
5050VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5051VS_SDK_INSTALLDIR_2013=
5052VS_VS_PLATFORM_NAME_2013="v120"
5053VS_SDK_PLATFORM_NAME_2013=
5054
5055################################################################################
5056
5057
5058
5059################################################################################
5060
5061
5062
5063################################################################################
5064# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5065# build environment and assigns it to VS_ENV_CMD
5066
5067
5068################################################################################
5069
5070
5071
5072################################################################################
5073# Check if the VS env variables were setup prior to running configure.
5074# If not, then find vcvarsall.bat and run it automatically, and integrate
5075# the set env variables into the spec file.
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090# This line needs to be here, verbatim, after all includes and the dummy hook
5091# definitions. It is replaced with custom functionality when building
5092# custom sources.
5093#CUSTOM_AUTOCONF_INCLUDE
5094
5095# Do not change or remove the following line, it is needed for consistency checks:
5096DATE_WHEN_GENERATED=1479984616
5097
5098###############################################################################
5099#
5100# Initialization / Boot-strapping
5101#
5102# The bootstrapping process needs to solve the "chicken or the egg" problem,
5103# thus it jumps back and forth, each time gaining something needed later on.
5104#
5105###############################################################################
5106
5107# If we are requested to print additional help, do that and then exit.
5108# This must be the very first call.
5109
5110  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5111
5112    # Print available toolchains
5113    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5114    $PRINTF "Which are valid to use depends on the build platform.\n"
5115    for toolchain in $VALID_TOOLCHAINS_all; do
5116      # Use indirect variable referencing
5117      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5118      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5119      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5120    done
5121    $PRINTF "\n"
5122
5123    # Print available jvm features
5124    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5125    $PRINTF "Which are valid to use depends on the target platform.\n  "
5126    $PRINTF "%s " $VALID_JVM_FEATURES
5127    $PRINTF "\n"
5128
5129    # And now exit directly
5130    exit 0
5131  fi
5132
5133
5134# Basic initialization that must happen first of all in the normal process.
5135
5136  # Save the original command line. This is passed to us by the wrapper configure script.
5137
5138  # Save the path variable before it gets changed
5139  ORIGINAL_PATH="$PATH"
5140
5141  DATE_WHEN_CONFIGURED=`LANG=C date`
5142
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5144$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5145  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5146$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5147
5148
5149  # Start with tools that do not need have cross compilation support
5150  # and can be expected to be found in the default PATH. These tools are
5151  # used by configure.
5152
5153  # First are all the simple required tools.
5154
5155
5156
5157  # Publish this variable in the help.
5158
5159
5160  if [ -z "${BASENAME+x}" ]; then
5161    # The variable is not set by user, try to locate tool using the code snippet
5162    for ac_prog in basename
5163do
5164  # Extract the first word of "$ac_prog", so it can be a program name with args.
5165set dummy $ac_prog; ac_word=$2
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5167$as_echo_n "checking for $ac_word... " >&6; }
5168if ${ac_cv_path_BASENAME+:} false; then :
5169  $as_echo_n "(cached) " >&6
5170else
5171  case $BASENAME in
5172  [\\/]* | ?:[\\/]*)
5173  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5174  ;;
5175  *)
5176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5177for as_dir in $PATH
5178do
5179  IFS=$as_save_IFS
5180  test -z "$as_dir" && as_dir=.
5181    for ac_exec_ext in '' $ac_executable_extensions; do
5182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5183    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5185    break 2
5186  fi
5187done
5188  done
5189IFS=$as_save_IFS
5190
5191  ;;
5192esac
5193fi
5194BASENAME=$ac_cv_path_BASENAME
5195if test -n "$BASENAME"; then
5196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5197$as_echo "$BASENAME" >&6; }
5198else
5199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200$as_echo "no" >&6; }
5201fi
5202
5203
5204  test -n "$BASENAME" && break
5205done
5206
5207  else
5208    # The variable is set, but is it from the command line or the environment?
5209
5210    # Try to remove the string !BASENAME! from our list.
5211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5213      # If it failed, the variable was not from the command line. Ignore it,
5214      # but warn the user (except for BASH, which is always set by the calling BASH).
5215      if test "xBASENAME" != xBASH; then
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5217$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5218      fi
5219      # Try to locate tool using the code snippet
5220      for ac_prog in basename
5221do
5222  # Extract the first word of "$ac_prog", so it can be a program name with args.
5223set dummy $ac_prog; ac_word=$2
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5225$as_echo_n "checking for $ac_word... " >&6; }
5226if ${ac_cv_path_BASENAME+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228else
5229  case $BASENAME in
5230  [\\/]* | ?:[\\/]*)
5231  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5232  ;;
5233  *)
5234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5235for as_dir in $PATH
5236do
5237  IFS=$as_save_IFS
5238  test -z "$as_dir" && as_dir=.
5239    for ac_exec_ext in '' $ac_executable_extensions; do
5240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5241    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5243    break 2
5244  fi
5245done
5246  done
5247IFS=$as_save_IFS
5248
5249  ;;
5250esac
5251fi
5252BASENAME=$ac_cv_path_BASENAME
5253if test -n "$BASENAME"; then
5254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5255$as_echo "$BASENAME" >&6; }
5256else
5257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258$as_echo "no" >&6; }
5259fi
5260
5261
5262  test -n "$BASENAME" && break
5263done
5264
5265    else
5266      # If it succeeded, then it was overridden by the user. We will use it
5267      # for the tool.
5268
5269      # First remove it from the list of overridden variables, so we can test
5270      # for unknown variables in the end.
5271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5272
5273      # Check if we try to supply an empty value
5274      if test "x$BASENAME" = x; then
5275        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5276$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5278$as_echo_n "checking for BASENAME... " >&6; }
5279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5280$as_echo "disabled" >&6; }
5281      else
5282        # Check if the provided tool contains a complete path.
5283        tool_specified="$BASENAME"
5284        tool_basename="${tool_specified##*/}"
5285        if test "x$tool_basename" = "x$tool_specified"; then
5286          # A command without a complete path is provided, search $PATH.
5287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5288$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5289          # Extract the first word of "$tool_basename", so it can be a program name with args.
5290set dummy $tool_basename; ac_word=$2
5291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5292$as_echo_n "checking for $ac_word... " >&6; }
5293if ${ac_cv_path_BASENAME+:} false; then :
5294  $as_echo_n "(cached) " >&6
5295else
5296  case $BASENAME in
5297  [\\/]* | ?:[\\/]*)
5298  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5299  ;;
5300  *)
5301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5302for as_dir in $PATH
5303do
5304  IFS=$as_save_IFS
5305  test -z "$as_dir" && as_dir=.
5306    for ac_exec_ext in '' $ac_executable_extensions; do
5307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5308    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5310    break 2
5311  fi
5312done
5313  done
5314IFS=$as_save_IFS
5315
5316  ;;
5317esac
5318fi
5319BASENAME=$ac_cv_path_BASENAME
5320if test -n "$BASENAME"; then
5321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5322$as_echo "$BASENAME" >&6; }
5323else
5324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5325$as_echo "no" >&6; }
5326fi
5327
5328
5329          if test "x$BASENAME" = x; then
5330            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5331          fi
5332        else
5333          # Otherwise we believe it is a complete path. Use it as it is.
5334          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5335$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5336          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5337$as_echo_n "checking for BASENAME... " >&6; }
5338          if test ! -x "$tool_specified"; then
5339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5340$as_echo "not found" >&6; }
5341            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5342          fi
5343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5344$as_echo "$tool_specified" >&6; }
5345        fi
5346      fi
5347    fi
5348
5349  fi
5350
5351
5352
5353  if test "x$BASENAME" = x; then
5354    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5355  fi
5356
5357
5358
5359
5360
5361  # Publish this variable in the help.
5362
5363
5364  if [ -z "${BASH+x}" ]; then
5365    # The variable is not set by user, try to locate tool using the code snippet
5366    for ac_prog in bash
5367do
5368  # Extract the first word of "$ac_prog", so it can be a program name with args.
5369set dummy $ac_prog; ac_word=$2
5370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5371$as_echo_n "checking for $ac_word... " >&6; }
5372if ${ac_cv_path_BASH+:} false; then :
5373  $as_echo_n "(cached) " >&6
5374else
5375  case $BASH in
5376  [\\/]* | ?:[\\/]*)
5377  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5378  ;;
5379  *)
5380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5381for as_dir in $PATH
5382do
5383  IFS=$as_save_IFS
5384  test -z "$as_dir" && as_dir=.
5385    for ac_exec_ext in '' $ac_executable_extensions; do
5386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5387    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5389    break 2
5390  fi
5391done
5392  done
5393IFS=$as_save_IFS
5394
5395  ;;
5396esac
5397fi
5398BASH=$ac_cv_path_BASH
5399if test -n "$BASH"; then
5400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5401$as_echo "$BASH" >&6; }
5402else
5403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5404$as_echo "no" >&6; }
5405fi
5406
5407
5408  test -n "$BASH" && break
5409done
5410
5411  else
5412    # The variable is set, but is it from the command line or the environment?
5413
5414    # Try to remove the string !BASH! from our list.
5415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5417      # If it failed, the variable was not from the command line. Ignore it,
5418      # but warn the user (except for BASH, which is always set by the calling BASH).
5419      if test "xBASH" != xBASH; then
5420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5421$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5422      fi
5423      # Try to locate tool using the code snippet
5424      for ac_prog in bash
5425do
5426  # Extract the first word of "$ac_prog", so it can be a program name with args.
5427set dummy $ac_prog; ac_word=$2
5428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5429$as_echo_n "checking for $ac_word... " >&6; }
5430if ${ac_cv_path_BASH+:} false; then :
5431  $as_echo_n "(cached) " >&6
5432else
5433  case $BASH in
5434  [\\/]* | ?:[\\/]*)
5435  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5436  ;;
5437  *)
5438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5439for as_dir in $PATH
5440do
5441  IFS=$as_save_IFS
5442  test -z "$as_dir" && as_dir=.
5443    for ac_exec_ext in '' $ac_executable_extensions; do
5444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5445    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5447    break 2
5448  fi
5449done
5450  done
5451IFS=$as_save_IFS
5452
5453  ;;
5454esac
5455fi
5456BASH=$ac_cv_path_BASH
5457if test -n "$BASH"; then
5458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5459$as_echo "$BASH" >&6; }
5460else
5461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5462$as_echo "no" >&6; }
5463fi
5464
5465
5466  test -n "$BASH" && break
5467done
5468
5469    else
5470      # If it succeeded, then it was overridden by the user. We will use it
5471      # for the tool.
5472
5473      # First remove it from the list of overridden variables, so we can test
5474      # for unknown variables in the end.
5475      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5476
5477      # Check if we try to supply an empty value
5478      if test "x$BASH" = x; then
5479        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5480$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5482$as_echo_n "checking for BASH... " >&6; }
5483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5484$as_echo "disabled" >&6; }
5485      else
5486        # Check if the provided tool contains a complete path.
5487        tool_specified="$BASH"
5488        tool_basename="${tool_specified##*/}"
5489        if test "x$tool_basename" = "x$tool_specified"; then
5490          # A command without a complete path is provided, search $PATH.
5491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5492$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5493          # Extract the first word of "$tool_basename", so it can be a program name with args.
5494set dummy $tool_basename; ac_word=$2
5495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
5497if ${ac_cv_path_BASH+:} false; then :
5498  $as_echo_n "(cached) " >&6
5499else
5500  case $BASH in
5501  [\\/]* | ?:[\\/]*)
5502  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5503  ;;
5504  *)
5505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5506for as_dir in $PATH
5507do
5508  IFS=$as_save_IFS
5509  test -z "$as_dir" && as_dir=.
5510    for ac_exec_ext in '' $ac_executable_extensions; do
5511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5512    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5514    break 2
5515  fi
5516done
5517  done
5518IFS=$as_save_IFS
5519
5520  ;;
5521esac
5522fi
5523BASH=$ac_cv_path_BASH
5524if test -n "$BASH"; then
5525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5526$as_echo "$BASH" >&6; }
5527else
5528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5529$as_echo "no" >&6; }
5530fi
5531
5532
5533          if test "x$BASH" = x; then
5534            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5535          fi
5536        else
5537          # Otherwise we believe it is a complete path. Use it as it is.
5538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5539$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5540          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5541$as_echo_n "checking for BASH... " >&6; }
5542          if test ! -x "$tool_specified"; then
5543            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5544$as_echo "not found" >&6; }
5545            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5546          fi
5547          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5548$as_echo "$tool_specified" >&6; }
5549        fi
5550      fi
5551    fi
5552
5553  fi
5554
5555
5556
5557  if test "x$BASH" = x; then
5558    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5559  fi
5560
5561
5562
5563
5564
5565  # Publish this variable in the help.
5566
5567
5568  if [ -z "${CAT+x}" ]; then
5569    # The variable is not set by user, try to locate tool using the code snippet
5570    for ac_prog in cat
5571do
5572  # Extract the first word of "$ac_prog", so it can be a program name with args.
5573set dummy $ac_prog; ac_word=$2
5574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5575$as_echo_n "checking for $ac_word... " >&6; }
5576if ${ac_cv_path_CAT+:} false; then :
5577  $as_echo_n "(cached) " >&6
5578else
5579  case $CAT in
5580  [\\/]* | ?:[\\/]*)
5581  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5582  ;;
5583  *)
5584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5585for as_dir in $PATH
5586do
5587  IFS=$as_save_IFS
5588  test -z "$as_dir" && as_dir=.
5589    for ac_exec_ext in '' $ac_executable_extensions; do
5590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5591    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5593    break 2
5594  fi
5595done
5596  done
5597IFS=$as_save_IFS
5598
5599  ;;
5600esac
5601fi
5602CAT=$ac_cv_path_CAT
5603if test -n "$CAT"; then
5604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5605$as_echo "$CAT" >&6; }
5606else
5607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5608$as_echo "no" >&6; }
5609fi
5610
5611
5612  test -n "$CAT" && break
5613done
5614
5615  else
5616    # The variable is set, but is it from the command line or the environment?
5617
5618    # Try to remove the string !CAT! from our list.
5619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5621      # If it failed, the variable was not from the command line. Ignore it,
5622      # but warn the user (except for BASH, which is always set by the calling BASH).
5623      if test "xCAT" != xBASH; then
5624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5625$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5626      fi
5627      # Try to locate tool using the code snippet
5628      for ac_prog in cat
5629do
5630  # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_path_CAT+:} false; then :
5635  $as_echo_n "(cached) " >&6
5636else
5637  case $CAT in
5638  [\\/]* | ?:[\\/]*)
5639  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5640  ;;
5641  *)
5642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645  IFS=$as_save_IFS
5646  test -z "$as_dir" && as_dir=.
5647    for ac_exec_ext in '' $ac_executable_extensions; do
5648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651    break 2
5652  fi
5653done
5654  done
5655IFS=$as_save_IFS
5656
5657  ;;
5658esac
5659fi
5660CAT=$ac_cv_path_CAT
5661if test -n "$CAT"; then
5662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5663$as_echo "$CAT" >&6; }
5664else
5665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670  test -n "$CAT" && break
5671done
5672
5673    else
5674      # If it succeeded, then it was overridden by the user. We will use it
5675      # for the tool.
5676
5677      # First remove it from the list of overridden variables, so we can test
5678      # for unknown variables in the end.
5679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5680
5681      # Check if we try to supply an empty value
5682      if test "x$CAT" = x; then
5683        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5684$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5685        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5686$as_echo_n "checking for CAT... " >&6; }
5687        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5688$as_echo "disabled" >&6; }
5689      else
5690        # Check if the provided tool contains a complete path.
5691        tool_specified="$CAT"
5692        tool_basename="${tool_specified##*/}"
5693        if test "x$tool_basename" = "x$tool_specified"; then
5694          # A command without a complete path is provided, search $PATH.
5695          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5696$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5697          # Extract the first word of "$tool_basename", so it can be a program name with args.
5698set dummy $tool_basename; ac_word=$2
5699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5700$as_echo_n "checking for $ac_word... " >&6; }
5701if ${ac_cv_path_CAT+:} false; then :
5702  $as_echo_n "(cached) " >&6
5703else
5704  case $CAT in
5705  [\\/]* | ?:[\\/]*)
5706  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5707  ;;
5708  *)
5709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712  IFS=$as_save_IFS
5713  test -z "$as_dir" && as_dir=.
5714    for ac_exec_ext in '' $ac_executable_extensions; do
5715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5716    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5718    break 2
5719  fi
5720done
5721  done
5722IFS=$as_save_IFS
5723
5724  ;;
5725esac
5726fi
5727CAT=$ac_cv_path_CAT
5728if test -n "$CAT"; then
5729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5730$as_echo "$CAT" >&6; }
5731else
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734fi
5735
5736
5737          if test "x$CAT" = x; then
5738            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5739          fi
5740        else
5741          # Otherwise we believe it is a complete path. Use it as it is.
5742          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5743$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5744          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5745$as_echo_n "checking for CAT... " >&6; }
5746          if test ! -x "$tool_specified"; then
5747            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5748$as_echo "not found" >&6; }
5749            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5750          fi
5751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5752$as_echo "$tool_specified" >&6; }
5753        fi
5754      fi
5755    fi
5756
5757  fi
5758
5759
5760
5761  if test "x$CAT" = x; then
5762    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5763  fi
5764
5765
5766
5767
5768
5769  # Publish this variable in the help.
5770
5771
5772  if [ -z "${CHMOD+x}" ]; then
5773    # The variable is not set by user, try to locate tool using the code snippet
5774    for ac_prog in chmod
5775do
5776  # Extract the first word of "$ac_prog", so it can be a program name with args.
5777set dummy $ac_prog; ac_word=$2
5778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5779$as_echo_n "checking for $ac_word... " >&6; }
5780if ${ac_cv_path_CHMOD+:} false; then :
5781  $as_echo_n "(cached) " >&6
5782else
5783  case $CHMOD in
5784  [\\/]* | ?:[\\/]*)
5785  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5786  ;;
5787  *)
5788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5789for as_dir in $PATH
5790do
5791  IFS=$as_save_IFS
5792  test -z "$as_dir" && as_dir=.
5793    for ac_exec_ext in '' $ac_executable_extensions; do
5794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5795    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5797    break 2
5798  fi
5799done
5800  done
5801IFS=$as_save_IFS
5802
5803  ;;
5804esac
5805fi
5806CHMOD=$ac_cv_path_CHMOD
5807if test -n "$CHMOD"; then
5808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5809$as_echo "$CHMOD" >&6; }
5810else
5811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5812$as_echo "no" >&6; }
5813fi
5814
5815
5816  test -n "$CHMOD" && break
5817done
5818
5819  else
5820    # The variable is set, but is it from the command line or the environment?
5821
5822    # Try to remove the string !CHMOD! from our list.
5823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5825      # If it failed, the variable was not from the command line. Ignore it,
5826      # but warn the user (except for BASH, which is always set by the calling BASH).
5827      if test "xCHMOD" != xBASH; then
5828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5829$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5830      fi
5831      # Try to locate tool using the code snippet
5832      for ac_prog in chmod
5833do
5834  # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_path_CHMOD+:} false; then :
5839  $as_echo_n "(cached) " >&6
5840else
5841  case $CHMOD in
5842  [\\/]* | ?:[\\/]*)
5843  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5844  ;;
5845  *)
5846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5847for as_dir in $PATH
5848do
5849  IFS=$as_save_IFS
5850  test -z "$as_dir" && as_dir=.
5851    for ac_exec_ext in '' $ac_executable_extensions; do
5852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5853    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5855    break 2
5856  fi
5857done
5858  done
5859IFS=$as_save_IFS
5860
5861  ;;
5862esac
5863fi
5864CHMOD=$ac_cv_path_CHMOD
5865if test -n "$CHMOD"; then
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5867$as_echo "$CHMOD" >&6; }
5868else
5869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870$as_echo "no" >&6; }
5871fi
5872
5873
5874  test -n "$CHMOD" && break
5875done
5876
5877    else
5878      # If it succeeded, then it was overridden by the user. We will use it
5879      # for the tool.
5880
5881      # First remove it from the list of overridden variables, so we can test
5882      # for unknown variables in the end.
5883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5884
5885      # Check if we try to supply an empty value
5886      if test "x$CHMOD" = x; then
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5888$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5890$as_echo_n "checking for CHMOD... " >&6; }
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5892$as_echo "disabled" >&6; }
5893      else
5894        # Check if the provided tool contains a complete path.
5895        tool_specified="$CHMOD"
5896        tool_basename="${tool_specified##*/}"
5897        if test "x$tool_basename" = "x$tool_specified"; then
5898          # A command without a complete path is provided, search $PATH.
5899          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5900$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5901          # Extract the first word of "$tool_basename", so it can be a program name with args.
5902set dummy $tool_basename; ac_word=$2
5903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5904$as_echo_n "checking for $ac_word... " >&6; }
5905if ${ac_cv_path_CHMOD+:} false; then :
5906  $as_echo_n "(cached) " >&6
5907else
5908  case $CHMOD in
5909  [\\/]* | ?:[\\/]*)
5910  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5911  ;;
5912  *)
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_exec_ext in '' $ac_executable_extensions; do
5919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5920    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5922    break 2
5923  fi
5924done
5925  done
5926IFS=$as_save_IFS
5927
5928  ;;
5929esac
5930fi
5931CHMOD=$ac_cv_path_CHMOD
5932if test -n "$CHMOD"; then
5933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5934$as_echo "$CHMOD" >&6; }
5935else
5936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5937$as_echo "no" >&6; }
5938fi
5939
5940
5941          if test "x$CHMOD" = x; then
5942            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5943          fi
5944        else
5945          # Otherwise we believe it is a complete path. Use it as it is.
5946          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5947$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5948          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5949$as_echo_n "checking for CHMOD... " >&6; }
5950          if test ! -x "$tool_specified"; then
5951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5952$as_echo "not found" >&6; }
5953            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5954          fi
5955          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5956$as_echo "$tool_specified" >&6; }
5957        fi
5958      fi
5959    fi
5960
5961  fi
5962
5963
5964
5965  if test "x$CHMOD" = x; then
5966    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5967  fi
5968
5969
5970
5971
5972
5973  # Publish this variable in the help.
5974
5975
5976  if [ -z "${CMP+x}" ]; then
5977    # The variable is not set by user, try to locate tool using the code snippet
5978    for ac_prog in cmp
5979do
5980  # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_path_CMP+:} false; then :
5985  $as_echo_n "(cached) " >&6
5986else
5987  case $CMP in
5988  [\\/]* | ?:[\\/]*)
5989  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5990  ;;
5991  *)
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_exec_ext in '' $ac_executable_extensions; do
5998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5999    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001    break 2
6002  fi
6003done
6004  done
6005IFS=$as_save_IFS
6006
6007  ;;
6008esac
6009fi
6010CMP=$ac_cv_path_CMP
6011if test -n "$CMP"; then
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6013$as_echo "$CMP" >&6; }
6014else
6015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016$as_echo "no" >&6; }
6017fi
6018
6019
6020  test -n "$CMP" && break
6021done
6022
6023  else
6024    # The variable is set, but is it from the command line or the environment?
6025
6026    # Try to remove the string !CMP! from our list.
6027    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6028    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6029      # If it failed, the variable was not from the command line. Ignore it,
6030      # but warn the user (except for BASH, which is always set by the calling BASH).
6031      if test "xCMP" != xBASH; then
6032        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6033$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6034      fi
6035      # Try to locate tool using the code snippet
6036      for ac_prog in cmp
6037do
6038  # Extract the first word of "$ac_prog", so it can be a program name with args.
6039set dummy $ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_path_CMP+:} false; then :
6043  $as_echo_n "(cached) " >&6
6044else
6045  case $CMP in
6046  [\\/]* | ?:[\\/]*)
6047  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6048  ;;
6049  *)
6050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6051for as_dir in $PATH
6052do
6053  IFS=$as_save_IFS
6054  test -z "$as_dir" && as_dir=.
6055    for ac_exec_ext in '' $ac_executable_extensions; do
6056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6057    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6059    break 2
6060  fi
6061done
6062  done
6063IFS=$as_save_IFS
6064
6065  ;;
6066esac
6067fi
6068CMP=$ac_cv_path_CMP
6069if test -n "$CMP"; then
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6071$as_echo "$CMP" >&6; }
6072else
6073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076
6077
6078  test -n "$CMP" && break
6079done
6080
6081    else
6082      # If it succeeded, then it was overridden by the user. We will use it
6083      # for the tool.
6084
6085      # First remove it from the list of overridden variables, so we can test
6086      # for unknown variables in the end.
6087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6088
6089      # Check if we try to supply an empty value
6090      if test "x$CMP" = x; then
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6092$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6093        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6094$as_echo_n "checking for CMP... " >&6; }
6095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6096$as_echo "disabled" >&6; }
6097      else
6098        # Check if the provided tool contains a complete path.
6099        tool_specified="$CMP"
6100        tool_basename="${tool_specified##*/}"
6101        if test "x$tool_basename" = "x$tool_specified"; then
6102          # A command without a complete path is provided, search $PATH.
6103          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6104$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6105          # Extract the first word of "$tool_basename", so it can be a program name with args.
6106set dummy $tool_basename; ac_word=$2
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6108$as_echo_n "checking for $ac_word... " >&6; }
6109if ${ac_cv_path_CMP+:} false; then :
6110  $as_echo_n "(cached) " >&6
6111else
6112  case $CMP in
6113  [\\/]* | ?:[\\/]*)
6114  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6115  ;;
6116  *)
6117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6118for as_dir in $PATH
6119do
6120  IFS=$as_save_IFS
6121  test -z "$as_dir" && as_dir=.
6122    for ac_exec_ext in '' $ac_executable_extensions; do
6123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6124    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6126    break 2
6127  fi
6128done
6129  done
6130IFS=$as_save_IFS
6131
6132  ;;
6133esac
6134fi
6135CMP=$ac_cv_path_CMP
6136if test -n "$CMP"; then
6137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6138$as_echo "$CMP" >&6; }
6139else
6140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6141$as_echo "no" >&6; }
6142fi
6143
6144
6145          if test "x$CMP" = x; then
6146            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6147          fi
6148        else
6149          # Otherwise we believe it is a complete path. Use it as it is.
6150          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6151$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6152          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6153$as_echo_n "checking for CMP... " >&6; }
6154          if test ! -x "$tool_specified"; then
6155            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6156$as_echo "not found" >&6; }
6157            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6158          fi
6159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6160$as_echo "$tool_specified" >&6; }
6161        fi
6162      fi
6163    fi
6164
6165  fi
6166
6167
6168
6169  if test "x$CMP" = x; then
6170    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6171  fi
6172
6173
6174
6175
6176
6177  # Publish this variable in the help.
6178
6179
6180  if [ -z "${COMM+x}" ]; then
6181    # The variable is not set by user, try to locate tool using the code snippet
6182    for ac_prog in comm
6183do
6184  # Extract the first word of "$ac_prog", so it can be a program name with args.
6185set dummy $ac_prog; ac_word=$2
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6187$as_echo_n "checking for $ac_word... " >&6; }
6188if ${ac_cv_path_COMM+:} false; then :
6189  $as_echo_n "(cached) " >&6
6190else
6191  case $COMM in
6192  [\\/]* | ?:[\\/]*)
6193  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6194  ;;
6195  *)
6196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6197for as_dir in $PATH
6198do
6199  IFS=$as_save_IFS
6200  test -z "$as_dir" && as_dir=.
6201    for ac_exec_ext in '' $ac_executable_extensions; do
6202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6203    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6205    break 2
6206  fi
6207done
6208  done
6209IFS=$as_save_IFS
6210
6211  ;;
6212esac
6213fi
6214COMM=$ac_cv_path_COMM
6215if test -n "$COMM"; then
6216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6217$as_echo "$COMM" >&6; }
6218else
6219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6220$as_echo "no" >&6; }
6221fi
6222
6223
6224  test -n "$COMM" && break
6225done
6226
6227  else
6228    # The variable is set, but is it from the command line or the environment?
6229
6230    # Try to remove the string !COMM! from our list.
6231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6233      # If it failed, the variable was not from the command line. Ignore it,
6234      # but warn the user (except for BASH, which is always set by the calling BASH).
6235      if test "xCOMM" != xBASH; then
6236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6237$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6238      fi
6239      # Try to locate tool using the code snippet
6240      for ac_prog in comm
6241do
6242  # Extract the first word of "$ac_prog", so it can be a program name with args.
6243set dummy $ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_path_COMM+:} false; then :
6247  $as_echo_n "(cached) " >&6
6248else
6249  case $COMM in
6250  [\\/]* | ?:[\\/]*)
6251  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6252  ;;
6253  *)
6254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6255for as_dir in $PATH
6256do
6257  IFS=$as_save_IFS
6258  test -z "$as_dir" && as_dir=.
6259    for ac_exec_ext in '' $ac_executable_extensions; do
6260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6261    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6263    break 2
6264  fi
6265done
6266  done
6267IFS=$as_save_IFS
6268
6269  ;;
6270esac
6271fi
6272COMM=$ac_cv_path_COMM
6273if test -n "$COMM"; then
6274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6275$as_echo "$COMM" >&6; }
6276else
6277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278$as_echo "no" >&6; }
6279fi
6280
6281
6282  test -n "$COMM" && break
6283done
6284
6285    else
6286      # If it succeeded, then it was overridden by the user. We will use it
6287      # for the tool.
6288
6289      # First remove it from the list of overridden variables, so we can test
6290      # for unknown variables in the end.
6291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6292
6293      # Check if we try to supply an empty value
6294      if test "x$COMM" = x; then
6295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6296$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6298$as_echo_n "checking for COMM... " >&6; }
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6300$as_echo "disabled" >&6; }
6301      else
6302        # Check if the provided tool contains a complete path.
6303        tool_specified="$COMM"
6304        tool_basename="${tool_specified##*/}"
6305        if test "x$tool_basename" = "x$tool_specified"; then
6306          # A command without a complete path is provided, search $PATH.
6307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6308$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6309          # Extract the first word of "$tool_basename", so it can be a program name with args.
6310set dummy $tool_basename; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_path_COMM+:} false; then :
6314  $as_echo_n "(cached) " >&6
6315else
6316  case $COMM in
6317  [\\/]* | ?:[\\/]*)
6318  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6319  ;;
6320  *)
6321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6322for as_dir in $PATH
6323do
6324  IFS=$as_save_IFS
6325  test -z "$as_dir" && as_dir=.
6326    for ac_exec_ext in '' $ac_executable_extensions; do
6327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6328    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6330    break 2
6331  fi
6332done
6333  done
6334IFS=$as_save_IFS
6335
6336  ;;
6337esac
6338fi
6339COMM=$ac_cv_path_COMM
6340if test -n "$COMM"; then
6341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6342$as_echo "$COMM" >&6; }
6343else
6344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345$as_echo "no" >&6; }
6346fi
6347
6348
6349          if test "x$COMM" = x; then
6350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6351          fi
6352        else
6353          # Otherwise we believe it is a complete path. Use it as it is.
6354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6355$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6357$as_echo_n "checking for COMM... " >&6; }
6358          if test ! -x "$tool_specified"; then
6359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6360$as_echo "not found" >&6; }
6361            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6362          fi
6363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6364$as_echo "$tool_specified" >&6; }
6365        fi
6366      fi
6367    fi
6368
6369  fi
6370
6371
6372
6373  if test "x$COMM" = x; then
6374    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6375  fi
6376
6377
6378
6379
6380
6381  # Publish this variable in the help.
6382
6383
6384  if [ -z "${CP+x}" ]; then
6385    # The variable is not set by user, try to locate tool using the code snippet
6386    for ac_prog in cp
6387do
6388  # Extract the first word of "$ac_prog", so it can be a program name with args.
6389set dummy $ac_prog; ac_word=$2
6390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391$as_echo_n "checking for $ac_word... " >&6; }
6392if ${ac_cv_path_CP+:} false; then :
6393  $as_echo_n "(cached) " >&6
6394else
6395  case $CP in
6396  [\\/]* | ?:[\\/]*)
6397  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6398  ;;
6399  *)
6400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403  IFS=$as_save_IFS
6404  test -z "$as_dir" && as_dir=.
6405    for ac_exec_ext in '' $ac_executable_extensions; do
6406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6407    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6409    break 2
6410  fi
6411done
6412  done
6413IFS=$as_save_IFS
6414
6415  ;;
6416esac
6417fi
6418CP=$ac_cv_path_CP
6419if test -n "$CP"; then
6420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6421$as_echo "$CP" >&6; }
6422else
6423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6424$as_echo "no" >&6; }
6425fi
6426
6427
6428  test -n "$CP" && break
6429done
6430
6431  else
6432    # The variable is set, but is it from the command line or the environment?
6433
6434    # Try to remove the string !CP! from our list.
6435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6437      # If it failed, the variable was not from the command line. Ignore it,
6438      # but warn the user (except for BASH, which is always set by the calling BASH).
6439      if test "xCP" != xBASH; then
6440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6441$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6442      fi
6443      # Try to locate tool using the code snippet
6444      for ac_prog in cp
6445do
6446  # Extract the first word of "$ac_prog", so it can be a program name with args.
6447set dummy $ac_prog; ac_word=$2
6448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6449$as_echo_n "checking for $ac_word... " >&6; }
6450if ${ac_cv_path_CP+:} false; then :
6451  $as_echo_n "(cached) " >&6
6452else
6453  case $CP in
6454  [\\/]* | ?:[\\/]*)
6455  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6456  ;;
6457  *)
6458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6459for as_dir in $PATH
6460do
6461  IFS=$as_save_IFS
6462  test -z "$as_dir" && as_dir=.
6463    for ac_exec_ext in '' $ac_executable_extensions; do
6464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6465    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6467    break 2
6468  fi
6469done
6470  done
6471IFS=$as_save_IFS
6472
6473  ;;
6474esac
6475fi
6476CP=$ac_cv_path_CP
6477if test -n "$CP"; then
6478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6479$as_echo "$CP" >&6; }
6480else
6481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6482$as_echo "no" >&6; }
6483fi
6484
6485
6486  test -n "$CP" && break
6487done
6488
6489    else
6490      # If it succeeded, then it was overridden by the user. We will use it
6491      # for the tool.
6492
6493      # First remove it from the list of overridden variables, so we can test
6494      # for unknown variables in the end.
6495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6496
6497      # Check if we try to supply an empty value
6498      if test "x$CP" = x; then
6499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6500$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6502$as_echo_n "checking for CP... " >&6; }
6503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6504$as_echo "disabled" >&6; }
6505      else
6506        # Check if the provided tool contains a complete path.
6507        tool_specified="$CP"
6508        tool_basename="${tool_specified##*/}"
6509        if test "x$tool_basename" = "x$tool_specified"; then
6510          # A command without a complete path is provided, search $PATH.
6511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6512$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6513          # Extract the first word of "$tool_basename", so it can be a program name with args.
6514set dummy $tool_basename; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_CP+:} false; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  case $CP in
6521  [\\/]* | ?:[\\/]*)
6522  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6523  ;;
6524  *)
6525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in $PATH
6527do
6528  IFS=$as_save_IFS
6529  test -z "$as_dir" && as_dir=.
6530    for ac_exec_ext in '' $ac_executable_extensions; do
6531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6532    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534    break 2
6535  fi
6536done
6537  done
6538IFS=$as_save_IFS
6539
6540  ;;
6541esac
6542fi
6543CP=$ac_cv_path_CP
6544if test -n "$CP"; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6546$as_echo "$CP" >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
6553          if test "x$CP" = x; then
6554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6555          fi
6556        else
6557          # Otherwise we believe it is a complete path. Use it as it is.
6558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6559$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6561$as_echo_n "checking for CP... " >&6; }
6562          if test ! -x "$tool_specified"; then
6563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6564$as_echo "not found" >&6; }
6565            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6566          fi
6567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6568$as_echo "$tool_specified" >&6; }
6569        fi
6570      fi
6571    fi
6572
6573  fi
6574
6575
6576
6577  if test "x$CP" = x; then
6578    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6579  fi
6580
6581
6582
6583
6584
6585  # Publish this variable in the help.
6586
6587
6588  if [ -z "${CUT+x}" ]; then
6589    # The variable is not set by user, try to locate tool using the code snippet
6590    for ac_prog in cut
6591do
6592  # Extract the first word of "$ac_prog", so it can be a program name with args.
6593set dummy $ac_prog; ac_word=$2
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6595$as_echo_n "checking for $ac_word... " >&6; }
6596if ${ac_cv_path_CUT+:} false; then :
6597  $as_echo_n "(cached) " >&6
6598else
6599  case $CUT in
6600  [\\/]* | ?:[\\/]*)
6601  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6602  ;;
6603  *)
6604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6605for as_dir in $PATH
6606do
6607  IFS=$as_save_IFS
6608  test -z "$as_dir" && as_dir=.
6609    for ac_exec_ext in '' $ac_executable_extensions; do
6610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6611    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6613    break 2
6614  fi
6615done
6616  done
6617IFS=$as_save_IFS
6618
6619  ;;
6620esac
6621fi
6622CUT=$ac_cv_path_CUT
6623if test -n "$CUT"; then
6624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6625$as_echo "$CUT" >&6; }
6626else
6627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628$as_echo "no" >&6; }
6629fi
6630
6631
6632  test -n "$CUT" && break
6633done
6634
6635  else
6636    # The variable is set, but is it from the command line or the environment?
6637
6638    # Try to remove the string !CUT! from our list.
6639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6641      # If it failed, the variable was not from the command line. Ignore it,
6642      # but warn the user (except for BASH, which is always set by the calling BASH).
6643      if test "xCUT" != xBASH; then
6644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6645$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6646      fi
6647      # Try to locate tool using the code snippet
6648      for ac_prog in cut
6649do
6650  # Extract the first word of "$ac_prog", so it can be a program name with args.
6651set dummy $ac_prog; ac_word=$2
6652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653$as_echo_n "checking for $ac_word... " >&6; }
6654if ${ac_cv_path_CUT+:} false; then :
6655  $as_echo_n "(cached) " >&6
6656else
6657  case $CUT in
6658  [\\/]* | ?:[\\/]*)
6659  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6660  ;;
6661  *)
6662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6663for as_dir in $PATH
6664do
6665  IFS=$as_save_IFS
6666  test -z "$as_dir" && as_dir=.
6667    for ac_exec_ext in '' $ac_executable_extensions; do
6668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6669    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6671    break 2
6672  fi
6673done
6674  done
6675IFS=$as_save_IFS
6676
6677  ;;
6678esac
6679fi
6680CUT=$ac_cv_path_CUT
6681if test -n "$CUT"; then
6682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6683$as_echo "$CUT" >&6; }
6684else
6685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6686$as_echo "no" >&6; }
6687fi
6688
6689
6690  test -n "$CUT" && break
6691done
6692
6693    else
6694      # If it succeeded, then it was overridden by the user. We will use it
6695      # for the tool.
6696
6697      # First remove it from the list of overridden variables, so we can test
6698      # for unknown variables in the end.
6699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6700
6701      # Check if we try to supply an empty value
6702      if test "x$CUT" = x; then
6703        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6704$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6705        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6706$as_echo_n "checking for CUT... " >&6; }
6707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6708$as_echo "disabled" >&6; }
6709      else
6710        # Check if the provided tool contains a complete path.
6711        tool_specified="$CUT"
6712        tool_basename="${tool_specified##*/}"
6713        if test "x$tool_basename" = "x$tool_specified"; then
6714          # A command without a complete path is provided, search $PATH.
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6716$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6717          # Extract the first word of "$tool_basename", so it can be a program name with args.
6718set dummy $tool_basename; ac_word=$2
6719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6720$as_echo_n "checking for $ac_word... " >&6; }
6721if ${ac_cv_path_CUT+:} false; then :
6722  $as_echo_n "(cached) " >&6
6723else
6724  case $CUT in
6725  [\\/]* | ?:[\\/]*)
6726  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6727  ;;
6728  *)
6729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6730for as_dir in $PATH
6731do
6732  IFS=$as_save_IFS
6733  test -z "$as_dir" && as_dir=.
6734    for ac_exec_ext in '' $ac_executable_extensions; do
6735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6736    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6738    break 2
6739  fi
6740done
6741  done
6742IFS=$as_save_IFS
6743
6744  ;;
6745esac
6746fi
6747CUT=$ac_cv_path_CUT
6748if test -n "$CUT"; then
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6750$as_echo "$CUT" >&6; }
6751else
6752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6753$as_echo "no" >&6; }
6754fi
6755
6756
6757          if test "x$CUT" = x; then
6758            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6759          fi
6760        else
6761          # Otherwise we believe it is a complete path. Use it as it is.
6762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6763$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6764          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6765$as_echo_n "checking for CUT... " >&6; }
6766          if test ! -x "$tool_specified"; then
6767            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6768$as_echo "not found" >&6; }
6769            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6770          fi
6771          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6772$as_echo "$tool_specified" >&6; }
6773        fi
6774      fi
6775    fi
6776
6777  fi
6778
6779
6780
6781  if test "x$CUT" = x; then
6782    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6783  fi
6784
6785
6786
6787
6788
6789  # Publish this variable in the help.
6790
6791
6792  if [ -z "${DATE+x}" ]; then
6793    # The variable is not set by user, try to locate tool using the code snippet
6794    for ac_prog in date
6795do
6796  # Extract the first word of "$ac_prog", so it can be a program name with args.
6797set dummy $ac_prog; ac_word=$2
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6799$as_echo_n "checking for $ac_word... " >&6; }
6800if ${ac_cv_path_DATE+:} false; then :
6801  $as_echo_n "(cached) " >&6
6802else
6803  case $DATE in
6804  [\\/]* | ?:[\\/]*)
6805  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6806  ;;
6807  *)
6808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6809for as_dir in $PATH
6810do
6811  IFS=$as_save_IFS
6812  test -z "$as_dir" && as_dir=.
6813    for ac_exec_ext in '' $ac_executable_extensions; do
6814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6815    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6817    break 2
6818  fi
6819done
6820  done
6821IFS=$as_save_IFS
6822
6823  ;;
6824esac
6825fi
6826DATE=$ac_cv_path_DATE
6827if test -n "$DATE"; then
6828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6829$as_echo "$DATE" >&6; }
6830else
6831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6832$as_echo "no" >&6; }
6833fi
6834
6835
6836  test -n "$DATE" && break
6837done
6838
6839  else
6840    # The variable is set, but is it from the command line or the environment?
6841
6842    # Try to remove the string !DATE! from our list.
6843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6845      # If it failed, the variable was not from the command line. Ignore it,
6846      # but warn the user (except for BASH, which is always set by the calling BASH).
6847      if test "xDATE" != xBASH; then
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6849$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6850      fi
6851      # Try to locate tool using the code snippet
6852      for ac_prog in date
6853do
6854  # Extract the first word of "$ac_prog", so it can be a program name with args.
6855set dummy $ac_prog; ac_word=$2
6856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6857$as_echo_n "checking for $ac_word... " >&6; }
6858if ${ac_cv_path_DATE+:} false; then :
6859  $as_echo_n "(cached) " >&6
6860else
6861  case $DATE in
6862  [\\/]* | ?:[\\/]*)
6863  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6864  ;;
6865  *)
6866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6867for as_dir in $PATH
6868do
6869  IFS=$as_save_IFS
6870  test -z "$as_dir" && as_dir=.
6871    for ac_exec_ext in '' $ac_executable_extensions; do
6872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6873    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6875    break 2
6876  fi
6877done
6878  done
6879IFS=$as_save_IFS
6880
6881  ;;
6882esac
6883fi
6884DATE=$ac_cv_path_DATE
6885if test -n "$DATE"; then
6886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6887$as_echo "$DATE" >&6; }
6888else
6889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890$as_echo "no" >&6; }
6891fi
6892
6893
6894  test -n "$DATE" && break
6895done
6896
6897    else
6898      # If it succeeded, then it was overridden by the user. We will use it
6899      # for the tool.
6900
6901      # First remove it from the list of overridden variables, so we can test
6902      # for unknown variables in the end.
6903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6904
6905      # Check if we try to supply an empty value
6906      if test "x$DATE" = x; then
6907        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6908$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6910$as_echo_n "checking for DATE... " >&6; }
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6912$as_echo "disabled" >&6; }
6913      else
6914        # Check if the provided tool contains a complete path.
6915        tool_specified="$DATE"
6916        tool_basename="${tool_specified##*/}"
6917        if test "x$tool_basename" = "x$tool_specified"; then
6918          # A command without a complete path is provided, search $PATH.
6919          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6920$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6921          # Extract the first word of "$tool_basename", so it can be a program name with args.
6922set dummy $tool_basename; ac_word=$2
6923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6924$as_echo_n "checking for $ac_word... " >&6; }
6925if ${ac_cv_path_DATE+:} false; then :
6926  $as_echo_n "(cached) " >&6
6927else
6928  case $DATE in
6929  [\\/]* | ?:[\\/]*)
6930  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6931  ;;
6932  *)
6933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6934for as_dir in $PATH
6935do
6936  IFS=$as_save_IFS
6937  test -z "$as_dir" && as_dir=.
6938    for ac_exec_ext in '' $ac_executable_extensions; do
6939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6940    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6942    break 2
6943  fi
6944done
6945  done
6946IFS=$as_save_IFS
6947
6948  ;;
6949esac
6950fi
6951DATE=$ac_cv_path_DATE
6952if test -n "$DATE"; then
6953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6954$as_echo "$DATE" >&6; }
6955else
6956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957$as_echo "no" >&6; }
6958fi
6959
6960
6961          if test "x$DATE" = x; then
6962            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6963          fi
6964        else
6965          # Otherwise we believe it is a complete path. Use it as it is.
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6967$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6968          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6969$as_echo_n "checking for DATE... " >&6; }
6970          if test ! -x "$tool_specified"; then
6971            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6972$as_echo "not found" >&6; }
6973            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6974          fi
6975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6976$as_echo "$tool_specified" >&6; }
6977        fi
6978      fi
6979    fi
6980
6981  fi
6982
6983
6984
6985  if test "x$DATE" = x; then
6986    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6987  fi
6988
6989
6990
6991
6992
6993  # Publish this variable in the help.
6994
6995
6996  if [ -z "${DIFF+x}" ]; then
6997    # The variable is not set by user, try to locate tool using the code snippet
6998    for ac_prog in gdiff diff
6999do
7000  # Extract the first word of "$ac_prog", so it can be a program name with args.
7001set dummy $ac_prog; ac_word=$2
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003$as_echo_n "checking for $ac_word... " >&6; }
7004if ${ac_cv_path_DIFF+:} false; then :
7005  $as_echo_n "(cached) " >&6
7006else
7007  case $DIFF in
7008  [\\/]* | ?:[\\/]*)
7009  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7010  ;;
7011  *)
7012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013for as_dir in $PATH
7014do
7015  IFS=$as_save_IFS
7016  test -z "$as_dir" && as_dir=.
7017    for ac_exec_ext in '' $ac_executable_extensions; do
7018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021    break 2
7022  fi
7023done
7024  done
7025IFS=$as_save_IFS
7026
7027  ;;
7028esac
7029fi
7030DIFF=$ac_cv_path_DIFF
7031if test -n "$DIFF"; then
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7033$as_echo "$DIFF" >&6; }
7034else
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036$as_echo "no" >&6; }
7037fi
7038
7039
7040  test -n "$DIFF" && break
7041done
7042
7043  else
7044    # The variable is set, but is it from the command line or the environment?
7045
7046    # Try to remove the string !DIFF! from our list.
7047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7049      # If it failed, the variable was not from the command line. Ignore it,
7050      # but warn the user (except for BASH, which is always set by the calling BASH).
7051      if test "xDIFF" != xBASH; then
7052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7053$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7054      fi
7055      # Try to locate tool using the code snippet
7056      for ac_prog in gdiff diff
7057do
7058  # Extract the first word of "$ac_prog", so it can be a program name with args.
7059set dummy $ac_prog; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_DIFF+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $DIFF in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088DIFF=$ac_cv_path_DIFF
7089if test -n "$DIFF"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7091$as_echo "$DIFF" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098  test -n "$DIFF" && break
7099done
7100
7101    else
7102      # If it succeeded, then it was overridden by the user. We will use it
7103      # for the tool.
7104
7105      # First remove it from the list of overridden variables, so we can test
7106      # for unknown variables in the end.
7107      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7108
7109      # Check if we try to supply an empty value
7110      if test "x$DIFF" = x; then
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7112$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7114$as_echo_n "checking for DIFF... " >&6; }
7115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7116$as_echo "disabled" >&6; }
7117      else
7118        # Check if the provided tool contains a complete path.
7119        tool_specified="$DIFF"
7120        tool_basename="${tool_specified##*/}"
7121        if test "x$tool_basename" = "x$tool_specified"; then
7122          # A command without a complete path is provided, search $PATH.
7123          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7124$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7125          # Extract the first word of "$tool_basename", so it can be a program name with args.
7126set dummy $tool_basename; ac_word=$2
7127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7128$as_echo_n "checking for $ac_word... " >&6; }
7129if ${ac_cv_path_DIFF+:} false; then :
7130  $as_echo_n "(cached) " >&6
7131else
7132  case $DIFF in
7133  [\\/]* | ?:[\\/]*)
7134  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7135  ;;
7136  *)
7137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7138for as_dir in $PATH
7139do
7140  IFS=$as_save_IFS
7141  test -z "$as_dir" && as_dir=.
7142    for ac_exec_ext in '' $ac_executable_extensions; do
7143  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7144    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7146    break 2
7147  fi
7148done
7149  done
7150IFS=$as_save_IFS
7151
7152  ;;
7153esac
7154fi
7155DIFF=$ac_cv_path_DIFF
7156if test -n "$DIFF"; then
7157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7158$as_echo "$DIFF" >&6; }
7159else
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7161$as_echo "no" >&6; }
7162fi
7163
7164
7165          if test "x$DIFF" = x; then
7166            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7167          fi
7168        else
7169          # Otherwise we believe it is a complete path. Use it as it is.
7170          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7171$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7172          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7173$as_echo_n "checking for DIFF... " >&6; }
7174          if test ! -x "$tool_specified"; then
7175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7176$as_echo "not found" >&6; }
7177            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7178          fi
7179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7180$as_echo "$tool_specified" >&6; }
7181        fi
7182      fi
7183    fi
7184
7185  fi
7186
7187
7188
7189  if test "x$DIFF" = x; then
7190    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7191  fi
7192
7193
7194
7195
7196
7197  # Publish this variable in the help.
7198
7199
7200  if [ -z "${DIRNAME+x}" ]; then
7201    # The variable is not set by user, try to locate tool using the code snippet
7202    for ac_prog in dirname
7203do
7204  # Extract the first word of "$ac_prog", so it can be a program name with args.
7205set dummy $ac_prog; ac_word=$2
7206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7207$as_echo_n "checking for $ac_word... " >&6; }
7208if ${ac_cv_path_DIRNAME+:} false; then :
7209  $as_echo_n "(cached) " >&6
7210else
7211  case $DIRNAME in
7212  [\\/]* | ?:[\\/]*)
7213  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7214  ;;
7215  *)
7216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7217for as_dir in $PATH
7218do
7219  IFS=$as_save_IFS
7220  test -z "$as_dir" && as_dir=.
7221    for ac_exec_ext in '' $ac_executable_extensions; do
7222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7223    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7225    break 2
7226  fi
7227done
7228  done
7229IFS=$as_save_IFS
7230
7231  ;;
7232esac
7233fi
7234DIRNAME=$ac_cv_path_DIRNAME
7235if test -n "$DIRNAME"; then
7236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7237$as_echo "$DIRNAME" >&6; }
7238else
7239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7240$as_echo "no" >&6; }
7241fi
7242
7243
7244  test -n "$DIRNAME" && break
7245done
7246
7247  else
7248    # The variable is set, but is it from the command line or the environment?
7249
7250    # Try to remove the string !DIRNAME! from our list.
7251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7253      # If it failed, the variable was not from the command line. Ignore it,
7254      # but warn the user (except for BASH, which is always set by the calling BASH).
7255      if test "xDIRNAME" != xBASH; then
7256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7257$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7258      fi
7259      # Try to locate tool using the code snippet
7260      for ac_prog in dirname
7261do
7262  # Extract the first word of "$ac_prog", so it can be a program name with args.
7263set dummy $ac_prog; ac_word=$2
7264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265$as_echo_n "checking for $ac_word... " >&6; }
7266if ${ac_cv_path_DIRNAME+:} false; then :
7267  $as_echo_n "(cached) " >&6
7268else
7269  case $DIRNAME in
7270  [\\/]* | ?:[\\/]*)
7271  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7272  ;;
7273  *)
7274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7281    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289  ;;
7290esac
7291fi
7292DIRNAME=$ac_cv_path_DIRNAME
7293if test -n "$DIRNAME"; then
7294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7295$as_echo "$DIRNAME" >&6; }
7296else
7297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298$as_echo "no" >&6; }
7299fi
7300
7301
7302  test -n "$DIRNAME" && break
7303done
7304
7305    else
7306      # If it succeeded, then it was overridden by the user. We will use it
7307      # for the tool.
7308
7309      # First remove it from the list of overridden variables, so we can test
7310      # for unknown variables in the end.
7311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7312
7313      # Check if we try to supply an empty value
7314      if test "x$DIRNAME" = x; then
7315        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7316$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7317        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7318$as_echo_n "checking for DIRNAME... " >&6; }
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7320$as_echo "disabled" >&6; }
7321      else
7322        # Check if the provided tool contains a complete path.
7323        tool_specified="$DIRNAME"
7324        tool_basename="${tool_specified##*/}"
7325        if test "x$tool_basename" = "x$tool_specified"; then
7326          # A command without a complete path is provided, search $PATH.
7327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7328$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7329          # Extract the first word of "$tool_basename", so it can be a program name with args.
7330set dummy $tool_basename; ac_word=$2
7331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7332$as_echo_n "checking for $ac_word... " >&6; }
7333if ${ac_cv_path_DIRNAME+:} false; then :
7334  $as_echo_n "(cached) " >&6
7335else
7336  case $DIRNAME in
7337  [\\/]* | ?:[\\/]*)
7338  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7339  ;;
7340  *)
7341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7342for as_dir in $PATH
7343do
7344  IFS=$as_save_IFS
7345  test -z "$as_dir" && as_dir=.
7346    for ac_exec_ext in '' $ac_executable_extensions; do
7347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7348    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7350    break 2
7351  fi
7352done
7353  done
7354IFS=$as_save_IFS
7355
7356  ;;
7357esac
7358fi
7359DIRNAME=$ac_cv_path_DIRNAME
7360if test -n "$DIRNAME"; then
7361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7362$as_echo "$DIRNAME" >&6; }
7363else
7364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7365$as_echo "no" >&6; }
7366fi
7367
7368
7369          if test "x$DIRNAME" = x; then
7370            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7371          fi
7372        else
7373          # Otherwise we believe it is a complete path. Use it as it is.
7374          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7375$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7376          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7377$as_echo_n "checking for DIRNAME... " >&6; }
7378          if test ! -x "$tool_specified"; then
7379            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7380$as_echo "not found" >&6; }
7381            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7382          fi
7383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7384$as_echo "$tool_specified" >&6; }
7385        fi
7386      fi
7387    fi
7388
7389  fi
7390
7391
7392
7393  if test "x$DIRNAME" = x; then
7394    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7395  fi
7396
7397
7398
7399
7400
7401  # Publish this variable in the help.
7402
7403
7404  if [ -z "${ECHO+x}" ]; then
7405    # The variable is not set by user, try to locate tool using the code snippet
7406    for ac_prog in echo
7407do
7408  # Extract the first word of "$ac_prog", so it can be a program name with args.
7409set dummy $ac_prog; ac_word=$2
7410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7411$as_echo_n "checking for $ac_word... " >&6; }
7412if ${ac_cv_path_ECHO+:} false; then :
7413  $as_echo_n "(cached) " >&6
7414else
7415  case $ECHO in
7416  [\\/]* | ?:[\\/]*)
7417  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7418  ;;
7419  *)
7420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7421for as_dir in $PATH
7422do
7423  IFS=$as_save_IFS
7424  test -z "$as_dir" && as_dir=.
7425    for ac_exec_ext in '' $ac_executable_extensions; do
7426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7427    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7429    break 2
7430  fi
7431done
7432  done
7433IFS=$as_save_IFS
7434
7435  ;;
7436esac
7437fi
7438ECHO=$ac_cv_path_ECHO
7439if test -n "$ECHO"; then
7440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7441$as_echo "$ECHO" >&6; }
7442else
7443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7444$as_echo "no" >&6; }
7445fi
7446
7447
7448  test -n "$ECHO" && break
7449done
7450
7451  else
7452    # The variable is set, but is it from the command line or the environment?
7453
7454    # Try to remove the string !ECHO! from our list.
7455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7457      # If it failed, the variable was not from the command line. Ignore it,
7458      # but warn the user (except for BASH, which is always set by the calling BASH).
7459      if test "xECHO" != xBASH; then
7460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7461$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7462      fi
7463      # Try to locate tool using the code snippet
7464      for ac_prog in echo
7465do
7466  # Extract the first word of "$ac_prog", so it can be a program name with args.
7467set dummy $ac_prog; ac_word=$2
7468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7469$as_echo_n "checking for $ac_word... " >&6; }
7470if ${ac_cv_path_ECHO+:} false; then :
7471  $as_echo_n "(cached) " >&6
7472else
7473  case $ECHO in
7474  [\\/]* | ?:[\\/]*)
7475  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7476  ;;
7477  *)
7478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7479for as_dir in $PATH
7480do
7481  IFS=$as_save_IFS
7482  test -z "$as_dir" && as_dir=.
7483    for ac_exec_ext in '' $ac_executable_extensions; do
7484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7485    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7487    break 2
7488  fi
7489done
7490  done
7491IFS=$as_save_IFS
7492
7493  ;;
7494esac
7495fi
7496ECHO=$ac_cv_path_ECHO
7497if test -n "$ECHO"; then
7498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7499$as_echo "$ECHO" >&6; }
7500else
7501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7502$as_echo "no" >&6; }
7503fi
7504
7505
7506  test -n "$ECHO" && break
7507done
7508
7509    else
7510      # If it succeeded, then it was overridden by the user. We will use it
7511      # for the tool.
7512
7513      # First remove it from the list of overridden variables, so we can test
7514      # for unknown variables in the end.
7515      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7516
7517      # Check if we try to supply an empty value
7518      if test "x$ECHO" = x; then
7519        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7520$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7521        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7522$as_echo_n "checking for ECHO... " >&6; }
7523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7524$as_echo "disabled" >&6; }
7525      else
7526        # Check if the provided tool contains a complete path.
7527        tool_specified="$ECHO"
7528        tool_basename="${tool_specified##*/}"
7529        if test "x$tool_basename" = "x$tool_specified"; then
7530          # A command without a complete path is provided, search $PATH.
7531          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7532$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7533          # Extract the first word of "$tool_basename", so it can be a program name with args.
7534set dummy $tool_basename; ac_word=$2
7535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7536$as_echo_n "checking for $ac_word... " >&6; }
7537if ${ac_cv_path_ECHO+:} false; then :
7538  $as_echo_n "(cached) " >&6
7539else
7540  case $ECHO in
7541  [\\/]* | ?:[\\/]*)
7542  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7543  ;;
7544  *)
7545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7546for as_dir in $PATH
7547do
7548  IFS=$as_save_IFS
7549  test -z "$as_dir" && as_dir=.
7550    for ac_exec_ext in '' $ac_executable_extensions; do
7551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7552    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7554    break 2
7555  fi
7556done
7557  done
7558IFS=$as_save_IFS
7559
7560  ;;
7561esac
7562fi
7563ECHO=$ac_cv_path_ECHO
7564if test -n "$ECHO"; then
7565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7566$as_echo "$ECHO" >&6; }
7567else
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7569$as_echo "no" >&6; }
7570fi
7571
7572
7573          if test "x$ECHO" = x; then
7574            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7575          fi
7576        else
7577          # Otherwise we believe it is a complete path. Use it as it is.
7578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7579$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7580          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7581$as_echo_n "checking for ECHO... " >&6; }
7582          if test ! -x "$tool_specified"; then
7583            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7584$as_echo "not found" >&6; }
7585            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7586          fi
7587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7588$as_echo "$tool_specified" >&6; }
7589        fi
7590      fi
7591    fi
7592
7593  fi
7594
7595
7596
7597  if test "x$ECHO" = x; then
7598    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7599  fi
7600
7601
7602
7603
7604
7605  # Publish this variable in the help.
7606
7607
7608  if [ -z "${EXPR+x}" ]; then
7609    # The variable is not set by user, try to locate tool using the code snippet
7610    for ac_prog in expr
7611do
7612  # Extract the first word of "$ac_prog", so it can be a program name with args.
7613set dummy $ac_prog; ac_word=$2
7614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7615$as_echo_n "checking for $ac_word... " >&6; }
7616if ${ac_cv_path_EXPR+:} false; then :
7617  $as_echo_n "(cached) " >&6
7618else
7619  case $EXPR in
7620  [\\/]* | ?:[\\/]*)
7621  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7622  ;;
7623  *)
7624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7625for as_dir in $PATH
7626do
7627  IFS=$as_save_IFS
7628  test -z "$as_dir" && as_dir=.
7629    for ac_exec_ext in '' $ac_executable_extensions; do
7630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7631    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7633    break 2
7634  fi
7635done
7636  done
7637IFS=$as_save_IFS
7638
7639  ;;
7640esac
7641fi
7642EXPR=$ac_cv_path_EXPR
7643if test -n "$EXPR"; then
7644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7645$as_echo "$EXPR" >&6; }
7646else
7647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
7649fi
7650
7651
7652  test -n "$EXPR" && break
7653done
7654
7655  else
7656    # The variable is set, but is it from the command line or the environment?
7657
7658    # Try to remove the string !EXPR! from our list.
7659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7661      # If it failed, the variable was not from the command line. Ignore it,
7662      # but warn the user (except for BASH, which is always set by the calling BASH).
7663      if test "xEXPR" != xBASH; then
7664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7665$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7666      fi
7667      # Try to locate tool using the code snippet
7668      for ac_prog in expr
7669do
7670  # Extract the first word of "$ac_prog", so it can be a program name with args.
7671set dummy $ac_prog; ac_word=$2
7672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7673$as_echo_n "checking for $ac_word... " >&6; }
7674if ${ac_cv_path_EXPR+:} false; then :
7675  $as_echo_n "(cached) " >&6
7676else
7677  case $EXPR in
7678  [\\/]* | ?:[\\/]*)
7679  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7680  ;;
7681  *)
7682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683for as_dir in $PATH
7684do
7685  IFS=$as_save_IFS
7686  test -z "$as_dir" && as_dir=.
7687    for ac_exec_ext in '' $ac_executable_extensions; do
7688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7689    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7691    break 2
7692  fi
7693done
7694  done
7695IFS=$as_save_IFS
7696
7697  ;;
7698esac
7699fi
7700EXPR=$ac_cv_path_EXPR
7701if test -n "$EXPR"; then
7702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7703$as_echo "$EXPR" >&6; }
7704else
7705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706$as_echo "no" >&6; }
7707fi
7708
7709
7710  test -n "$EXPR" && break
7711done
7712
7713    else
7714      # If it succeeded, then it was overridden by the user. We will use it
7715      # for the tool.
7716
7717      # First remove it from the list of overridden variables, so we can test
7718      # for unknown variables in the end.
7719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7720
7721      # Check if we try to supply an empty value
7722      if test "x$EXPR" = x; then
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7724$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7726$as_echo_n "checking for EXPR... " >&6; }
7727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7728$as_echo "disabled" >&6; }
7729      else
7730        # Check if the provided tool contains a complete path.
7731        tool_specified="$EXPR"
7732        tool_basename="${tool_specified##*/}"
7733        if test "x$tool_basename" = "x$tool_specified"; then
7734          # A command without a complete path is provided, search $PATH.
7735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7736$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7737          # Extract the first word of "$tool_basename", so it can be a program name with args.
7738set dummy $tool_basename; ac_word=$2
7739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7740$as_echo_n "checking for $ac_word... " >&6; }
7741if ${ac_cv_path_EXPR+:} false; then :
7742  $as_echo_n "(cached) " >&6
7743else
7744  case $EXPR in
7745  [\\/]* | ?:[\\/]*)
7746  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7747  ;;
7748  *)
7749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7750for as_dir in $PATH
7751do
7752  IFS=$as_save_IFS
7753  test -z "$as_dir" && as_dir=.
7754    for ac_exec_ext in '' $ac_executable_extensions; do
7755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7756    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7758    break 2
7759  fi
7760done
7761  done
7762IFS=$as_save_IFS
7763
7764  ;;
7765esac
7766fi
7767EXPR=$ac_cv_path_EXPR
7768if test -n "$EXPR"; then
7769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7770$as_echo "$EXPR" >&6; }
7771else
7772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7773$as_echo "no" >&6; }
7774fi
7775
7776
7777          if test "x$EXPR" = x; then
7778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7779          fi
7780        else
7781          # Otherwise we believe it is a complete path. Use it as it is.
7782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7783$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7785$as_echo_n "checking for EXPR... " >&6; }
7786          if test ! -x "$tool_specified"; then
7787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7788$as_echo "not found" >&6; }
7789            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7790          fi
7791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7792$as_echo "$tool_specified" >&6; }
7793        fi
7794      fi
7795    fi
7796
7797  fi
7798
7799
7800
7801  if test "x$EXPR" = x; then
7802    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7803  fi
7804
7805
7806
7807
7808
7809  # Publish this variable in the help.
7810
7811
7812  if [ -z "${FILE+x}" ]; then
7813    # The variable is not set by user, try to locate tool using the code snippet
7814    for ac_prog in file
7815do
7816  # Extract the first word of "$ac_prog", so it can be a program name with args.
7817set dummy $ac_prog; ac_word=$2
7818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7819$as_echo_n "checking for $ac_word... " >&6; }
7820if ${ac_cv_path_FILE+:} false; then :
7821  $as_echo_n "(cached) " >&6
7822else
7823  case $FILE in
7824  [\\/]* | ?:[\\/]*)
7825  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7826  ;;
7827  *)
7828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7829for as_dir in $PATH
7830do
7831  IFS=$as_save_IFS
7832  test -z "$as_dir" && as_dir=.
7833    for ac_exec_ext in '' $ac_executable_extensions; do
7834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7835    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7837    break 2
7838  fi
7839done
7840  done
7841IFS=$as_save_IFS
7842
7843  ;;
7844esac
7845fi
7846FILE=$ac_cv_path_FILE
7847if test -n "$FILE"; then
7848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7849$as_echo "$FILE" >&6; }
7850else
7851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7852$as_echo "no" >&6; }
7853fi
7854
7855
7856  test -n "$FILE" && break
7857done
7858
7859  else
7860    # The variable is set, but is it from the command line or the environment?
7861
7862    # Try to remove the string !FILE! from our list.
7863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7865      # If it failed, the variable was not from the command line. Ignore it,
7866      # but warn the user (except for BASH, which is always set by the calling BASH).
7867      if test "xFILE" != xBASH; then
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7869$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7870      fi
7871      # Try to locate tool using the code snippet
7872      for ac_prog in file
7873do
7874  # Extract the first word of "$ac_prog", so it can be a program name with args.
7875set dummy $ac_prog; ac_word=$2
7876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877$as_echo_n "checking for $ac_word... " >&6; }
7878if ${ac_cv_path_FILE+:} false; then :
7879  $as_echo_n "(cached) " >&6
7880else
7881  case $FILE in
7882  [\\/]* | ?:[\\/]*)
7883  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7884  ;;
7885  *)
7886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7887for as_dir in $PATH
7888do
7889  IFS=$as_save_IFS
7890  test -z "$as_dir" && as_dir=.
7891    for ac_exec_ext in '' $ac_executable_extensions; do
7892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7893    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7895    break 2
7896  fi
7897done
7898  done
7899IFS=$as_save_IFS
7900
7901  ;;
7902esac
7903fi
7904FILE=$ac_cv_path_FILE
7905if test -n "$FILE"; then
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7907$as_echo "$FILE" >&6; }
7908else
7909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7910$as_echo "no" >&6; }
7911fi
7912
7913
7914  test -n "$FILE" && break
7915done
7916
7917    else
7918      # If it succeeded, then it was overridden by the user. We will use it
7919      # for the tool.
7920
7921      # First remove it from the list of overridden variables, so we can test
7922      # for unknown variables in the end.
7923      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7924
7925      # Check if we try to supply an empty value
7926      if test "x$FILE" = x; then
7927        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7928$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7929        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7930$as_echo_n "checking for FILE... " >&6; }
7931        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7932$as_echo "disabled" >&6; }
7933      else
7934        # Check if the provided tool contains a complete path.
7935        tool_specified="$FILE"
7936        tool_basename="${tool_specified##*/}"
7937        if test "x$tool_basename" = "x$tool_specified"; then
7938          # A command without a complete path is provided, search $PATH.
7939          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7940$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7941          # Extract the first word of "$tool_basename", so it can be a program name with args.
7942set dummy $tool_basename; ac_word=$2
7943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7944$as_echo_n "checking for $ac_word... " >&6; }
7945if ${ac_cv_path_FILE+:} false; then :
7946  $as_echo_n "(cached) " >&6
7947else
7948  case $FILE in
7949  [\\/]* | ?:[\\/]*)
7950  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7951  ;;
7952  *)
7953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7954for as_dir in $PATH
7955do
7956  IFS=$as_save_IFS
7957  test -z "$as_dir" && as_dir=.
7958    for ac_exec_ext in '' $ac_executable_extensions; do
7959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7960    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7962    break 2
7963  fi
7964done
7965  done
7966IFS=$as_save_IFS
7967
7968  ;;
7969esac
7970fi
7971FILE=$ac_cv_path_FILE
7972if test -n "$FILE"; then
7973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7974$as_echo "$FILE" >&6; }
7975else
7976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7977$as_echo "no" >&6; }
7978fi
7979
7980
7981          if test "x$FILE" = x; then
7982            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7983          fi
7984        else
7985          # Otherwise we believe it is a complete path. Use it as it is.
7986          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7987$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7988          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7989$as_echo_n "checking for FILE... " >&6; }
7990          if test ! -x "$tool_specified"; then
7991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7992$as_echo "not found" >&6; }
7993            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7994          fi
7995          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7996$as_echo "$tool_specified" >&6; }
7997        fi
7998      fi
7999    fi
8000
8001  fi
8002
8003
8004
8005  if test "x$FILE" = x; then
8006    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8007  fi
8008
8009
8010
8011
8012
8013  # Publish this variable in the help.
8014
8015
8016  if [ -z "${FIND+x}" ]; then
8017    # The variable is not set by user, try to locate tool using the code snippet
8018    for ac_prog in find
8019do
8020  # Extract the first word of "$ac_prog", so it can be a program name with args.
8021set dummy $ac_prog; ac_word=$2
8022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8023$as_echo_n "checking for $ac_word... " >&6; }
8024if ${ac_cv_path_FIND+:} false; then :
8025  $as_echo_n "(cached) " >&6
8026else
8027  case $FIND in
8028  [\\/]* | ?:[\\/]*)
8029  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8030  ;;
8031  *)
8032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8033for as_dir in $PATH
8034do
8035  IFS=$as_save_IFS
8036  test -z "$as_dir" && as_dir=.
8037    for ac_exec_ext in '' $ac_executable_extensions; do
8038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8039    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8041    break 2
8042  fi
8043done
8044  done
8045IFS=$as_save_IFS
8046
8047  ;;
8048esac
8049fi
8050FIND=$ac_cv_path_FIND
8051if test -n "$FIND"; then
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8053$as_echo "$FIND" >&6; }
8054else
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8056$as_echo "no" >&6; }
8057fi
8058
8059
8060  test -n "$FIND" && break
8061done
8062
8063  else
8064    # The variable is set, but is it from the command line or the environment?
8065
8066    # Try to remove the string !FIND! from our list.
8067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8069      # If it failed, the variable was not from the command line. Ignore it,
8070      # but warn the user (except for BASH, which is always set by the calling BASH).
8071      if test "xFIND" != xBASH; then
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8073$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8074      fi
8075      # Try to locate tool using the code snippet
8076      for ac_prog in find
8077do
8078  # Extract the first word of "$ac_prog", so it can be a program name with args.
8079set dummy $ac_prog; ac_word=$2
8080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8081$as_echo_n "checking for $ac_word... " >&6; }
8082if ${ac_cv_path_FIND+:} false; then :
8083  $as_echo_n "(cached) " >&6
8084else
8085  case $FIND in
8086  [\\/]* | ?:[\\/]*)
8087  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8088  ;;
8089  *)
8090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8091for as_dir in $PATH
8092do
8093  IFS=$as_save_IFS
8094  test -z "$as_dir" && as_dir=.
8095    for ac_exec_ext in '' $ac_executable_extensions; do
8096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8097    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8099    break 2
8100  fi
8101done
8102  done
8103IFS=$as_save_IFS
8104
8105  ;;
8106esac
8107fi
8108FIND=$ac_cv_path_FIND
8109if test -n "$FIND"; then
8110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8111$as_echo "$FIND" >&6; }
8112else
8113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8114$as_echo "no" >&6; }
8115fi
8116
8117
8118  test -n "$FIND" && break
8119done
8120
8121    else
8122      # If it succeeded, then it was overridden by the user. We will use it
8123      # for the tool.
8124
8125      # First remove it from the list of overridden variables, so we can test
8126      # for unknown variables in the end.
8127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8128
8129      # Check if we try to supply an empty value
8130      if test "x$FIND" = x; then
8131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8132$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8134$as_echo_n "checking for FIND... " >&6; }
8135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8136$as_echo "disabled" >&6; }
8137      else
8138        # Check if the provided tool contains a complete path.
8139        tool_specified="$FIND"
8140        tool_basename="${tool_specified##*/}"
8141        if test "x$tool_basename" = "x$tool_specified"; then
8142          # A command without a complete path is provided, search $PATH.
8143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8144$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8145          # Extract the first word of "$tool_basename", so it can be a program name with args.
8146set dummy $tool_basename; ac_word=$2
8147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8148$as_echo_n "checking for $ac_word... " >&6; }
8149if ${ac_cv_path_FIND+:} false; then :
8150  $as_echo_n "(cached) " >&6
8151else
8152  case $FIND in
8153  [\\/]* | ?:[\\/]*)
8154  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8155  ;;
8156  *)
8157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8158for as_dir in $PATH
8159do
8160  IFS=$as_save_IFS
8161  test -z "$as_dir" && as_dir=.
8162    for ac_exec_ext in '' $ac_executable_extensions; do
8163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8164    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8166    break 2
8167  fi
8168done
8169  done
8170IFS=$as_save_IFS
8171
8172  ;;
8173esac
8174fi
8175FIND=$ac_cv_path_FIND
8176if test -n "$FIND"; then
8177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8178$as_echo "$FIND" >&6; }
8179else
8180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8181$as_echo "no" >&6; }
8182fi
8183
8184
8185          if test "x$FIND" = x; then
8186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8187          fi
8188        else
8189          # Otherwise we believe it is a complete path. Use it as it is.
8190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8191$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8193$as_echo_n "checking for FIND... " >&6; }
8194          if test ! -x "$tool_specified"; then
8195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8196$as_echo "not found" >&6; }
8197            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8198          fi
8199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8200$as_echo "$tool_specified" >&6; }
8201        fi
8202      fi
8203    fi
8204
8205  fi
8206
8207
8208
8209  if test "x$FIND" = x; then
8210    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8211  fi
8212
8213
8214
8215
8216
8217  # Publish this variable in the help.
8218
8219
8220  if [ -z "${HEAD+x}" ]; then
8221    # The variable is not set by user, try to locate tool using the code snippet
8222    for ac_prog in head
8223do
8224  # Extract the first word of "$ac_prog", so it can be a program name with args.
8225set dummy $ac_prog; ac_word=$2
8226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8227$as_echo_n "checking for $ac_word... " >&6; }
8228if ${ac_cv_path_HEAD+:} false; then :
8229  $as_echo_n "(cached) " >&6
8230else
8231  case $HEAD in
8232  [\\/]* | ?:[\\/]*)
8233  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8234  ;;
8235  *)
8236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237for as_dir in $PATH
8238do
8239  IFS=$as_save_IFS
8240  test -z "$as_dir" && as_dir=.
8241    for ac_exec_ext in '' $ac_executable_extensions; do
8242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8243    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8245    break 2
8246  fi
8247done
8248  done
8249IFS=$as_save_IFS
8250
8251  ;;
8252esac
8253fi
8254HEAD=$ac_cv_path_HEAD
8255if test -n "$HEAD"; then
8256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8257$as_echo "$HEAD" >&6; }
8258else
8259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
8261fi
8262
8263
8264  test -n "$HEAD" && break
8265done
8266
8267  else
8268    # The variable is set, but is it from the command line or the environment?
8269
8270    # Try to remove the string !HEAD! from our list.
8271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8273      # If it failed, the variable was not from the command line. Ignore it,
8274      # but warn the user (except for BASH, which is always set by the calling BASH).
8275      if test "xHEAD" != xBASH; then
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8277$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8278      fi
8279      # Try to locate tool using the code snippet
8280      for ac_prog in head
8281do
8282  # Extract the first word of "$ac_prog", so it can be a program name with args.
8283set dummy $ac_prog; ac_word=$2
8284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_path_HEAD+:} false; then :
8287  $as_echo_n "(cached) " >&6
8288else
8289  case $HEAD in
8290  [\\/]* | ?:[\\/]*)
8291  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8292  ;;
8293  *)
8294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8295for as_dir in $PATH
8296do
8297  IFS=$as_save_IFS
8298  test -z "$as_dir" && as_dir=.
8299    for ac_exec_ext in '' $ac_executable_extensions; do
8300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8301    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8303    break 2
8304  fi
8305done
8306  done
8307IFS=$as_save_IFS
8308
8309  ;;
8310esac
8311fi
8312HEAD=$ac_cv_path_HEAD
8313if test -n "$HEAD"; then
8314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8315$as_echo "$HEAD" >&6; }
8316else
8317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8318$as_echo "no" >&6; }
8319fi
8320
8321
8322  test -n "$HEAD" && break
8323done
8324
8325    else
8326      # If it succeeded, then it was overridden by the user. We will use it
8327      # for the tool.
8328
8329      # First remove it from the list of overridden variables, so we can test
8330      # for unknown variables in the end.
8331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8332
8333      # Check if we try to supply an empty value
8334      if test "x$HEAD" = x; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8336$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8338$as_echo_n "checking for HEAD... " >&6; }
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8340$as_echo "disabled" >&6; }
8341      else
8342        # Check if the provided tool contains a complete path.
8343        tool_specified="$HEAD"
8344        tool_basename="${tool_specified##*/}"
8345        if test "x$tool_basename" = "x$tool_specified"; then
8346          # A command without a complete path is provided, search $PATH.
8347          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8348$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8349          # Extract the first word of "$tool_basename", so it can be a program name with args.
8350set dummy $tool_basename; ac_word=$2
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8352$as_echo_n "checking for $ac_word... " >&6; }
8353if ${ac_cv_path_HEAD+:} false; then :
8354  $as_echo_n "(cached) " >&6
8355else
8356  case $HEAD in
8357  [\\/]* | ?:[\\/]*)
8358  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8359  ;;
8360  *)
8361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8362for as_dir in $PATH
8363do
8364  IFS=$as_save_IFS
8365  test -z "$as_dir" && as_dir=.
8366    for ac_exec_ext in '' $ac_executable_extensions; do
8367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8368    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8370    break 2
8371  fi
8372done
8373  done
8374IFS=$as_save_IFS
8375
8376  ;;
8377esac
8378fi
8379HEAD=$ac_cv_path_HEAD
8380if test -n "$HEAD"; then
8381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8382$as_echo "$HEAD" >&6; }
8383else
8384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8385$as_echo "no" >&6; }
8386fi
8387
8388
8389          if test "x$HEAD" = x; then
8390            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8391          fi
8392        else
8393          # Otherwise we believe it is a complete path. Use it as it is.
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8395$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8396          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8397$as_echo_n "checking for HEAD... " >&6; }
8398          if test ! -x "$tool_specified"; then
8399            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8400$as_echo "not found" >&6; }
8401            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8402          fi
8403          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8404$as_echo "$tool_specified" >&6; }
8405        fi
8406      fi
8407    fi
8408
8409  fi
8410
8411
8412
8413  if test "x$HEAD" = x; then
8414    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8415  fi
8416
8417
8418
8419
8420
8421  # Publish this variable in the help.
8422
8423
8424  if [ -z "${GUNZIP+x}" ]; then
8425    # The variable is not set by user, try to locate tool using the code snippet
8426    for ac_prog in gunzip
8427do
8428  # Extract the first word of "$ac_prog", so it can be a program name with args.
8429set dummy $ac_prog; ac_word=$2
8430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8431$as_echo_n "checking for $ac_word... " >&6; }
8432if ${ac_cv_path_GUNZIP+:} false; then :
8433  $as_echo_n "(cached) " >&6
8434else
8435  case $GUNZIP in
8436  [\\/]* | ?:[\\/]*)
8437  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8438  ;;
8439  *)
8440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8441for as_dir in $PATH
8442do
8443  IFS=$as_save_IFS
8444  test -z "$as_dir" && as_dir=.
8445    for ac_exec_ext in '' $ac_executable_extensions; do
8446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8447    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8449    break 2
8450  fi
8451done
8452  done
8453IFS=$as_save_IFS
8454
8455  ;;
8456esac
8457fi
8458GUNZIP=$ac_cv_path_GUNZIP
8459if test -n "$GUNZIP"; then
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8461$as_echo "$GUNZIP" >&6; }
8462else
8463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8464$as_echo "no" >&6; }
8465fi
8466
8467
8468  test -n "$GUNZIP" && break
8469done
8470
8471  else
8472    # The variable is set, but is it from the command line or the environment?
8473
8474    # Try to remove the string !GUNZIP! from our list.
8475    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8476    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8477      # If it failed, the variable was not from the command line. Ignore it,
8478      # but warn the user (except for BASH, which is always set by the calling BASH).
8479      if test "xGUNZIP" != xBASH; then
8480        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8481$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8482      fi
8483      # Try to locate tool using the code snippet
8484      for ac_prog in gunzip
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_GUNZIP+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $GUNZIP in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516GUNZIP=$ac_cv_path_GUNZIP
8517if test -n "$GUNZIP"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8519$as_echo "$GUNZIP" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$GUNZIP" && break
8527done
8528
8529    else
8530      # If it succeeded, then it was overridden by the user. We will use it
8531      # for the tool.
8532
8533      # First remove it from the list of overridden variables, so we can test
8534      # for unknown variables in the end.
8535      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8536
8537      # Check if we try to supply an empty value
8538      if test "x$GUNZIP" = x; then
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8540$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8542$as_echo_n "checking for GUNZIP... " >&6; }
8543        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8544$as_echo "disabled" >&6; }
8545      else
8546        # Check if the provided tool contains a complete path.
8547        tool_specified="$GUNZIP"
8548        tool_basename="${tool_specified##*/}"
8549        if test "x$tool_basename" = "x$tool_specified"; then
8550          # A command without a complete path is provided, search $PATH.
8551          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8552$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8553          # Extract the first word of "$tool_basename", so it can be a program name with args.
8554set dummy $tool_basename; ac_word=$2
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8556$as_echo_n "checking for $ac_word... " >&6; }
8557if ${ac_cv_path_GUNZIP+:} false; then :
8558  $as_echo_n "(cached) " >&6
8559else
8560  case $GUNZIP in
8561  [\\/]* | ?:[\\/]*)
8562  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8563  ;;
8564  *)
8565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8566for as_dir in $PATH
8567do
8568  IFS=$as_save_IFS
8569  test -z "$as_dir" && as_dir=.
8570    for ac_exec_ext in '' $ac_executable_extensions; do
8571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8572    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8574    break 2
8575  fi
8576done
8577  done
8578IFS=$as_save_IFS
8579
8580  ;;
8581esac
8582fi
8583GUNZIP=$ac_cv_path_GUNZIP
8584if test -n "$GUNZIP"; then
8585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8586$as_echo "$GUNZIP" >&6; }
8587else
8588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8589$as_echo "no" >&6; }
8590fi
8591
8592
8593          if test "x$GUNZIP" = x; then
8594            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8595          fi
8596        else
8597          # Otherwise we believe it is a complete path. Use it as it is.
8598          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8599$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8600          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8601$as_echo_n "checking for GUNZIP... " >&6; }
8602          if test ! -x "$tool_specified"; then
8603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8604$as_echo "not found" >&6; }
8605            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8606          fi
8607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8608$as_echo "$tool_specified" >&6; }
8609        fi
8610      fi
8611    fi
8612
8613  fi
8614
8615
8616
8617  if test "x$GUNZIP" = x; then
8618    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8619  fi
8620
8621
8622
8623
8624
8625  # Publish this variable in the help.
8626
8627
8628  if [ -z "${GZIP+x}" ]; then
8629    # The variable is not set by user, try to locate tool using the code snippet
8630    for ac_prog in pigz gzip
8631do
8632  # Extract the first word of "$ac_prog", so it can be a program name with args.
8633set dummy $ac_prog; ac_word=$2
8634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8635$as_echo_n "checking for $ac_word... " >&6; }
8636if ${ac_cv_path_GZIP+:} false; then :
8637  $as_echo_n "(cached) " >&6
8638else
8639  case $GZIP in
8640  [\\/]* | ?:[\\/]*)
8641  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8642  ;;
8643  *)
8644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8645for as_dir in $PATH
8646do
8647  IFS=$as_save_IFS
8648  test -z "$as_dir" && as_dir=.
8649    for ac_exec_ext in '' $ac_executable_extensions; do
8650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8651    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8653    break 2
8654  fi
8655done
8656  done
8657IFS=$as_save_IFS
8658
8659  ;;
8660esac
8661fi
8662GZIP=$ac_cv_path_GZIP
8663if test -n "$GZIP"; then
8664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8665$as_echo "$GZIP" >&6; }
8666else
8667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668$as_echo "no" >&6; }
8669fi
8670
8671
8672  test -n "$GZIP" && break
8673done
8674
8675  else
8676    # The variable is set, but is it from the command line or the environment?
8677
8678    # Try to remove the string !GZIP! from our list.
8679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8681      # If it failed, the variable was not from the command line. Ignore it,
8682      # but warn the user (except for BASH, which is always set by the calling BASH).
8683      if test "xGZIP" != xBASH; then
8684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8685$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8686      fi
8687      # Try to locate tool using the code snippet
8688      for ac_prog in pigz gzip
8689do
8690  # Extract the first word of "$ac_prog", so it can be a program name with args.
8691set dummy $ac_prog; ac_word=$2
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8693$as_echo_n "checking for $ac_word... " >&6; }
8694if ${ac_cv_path_GZIP+:} false; then :
8695  $as_echo_n "(cached) " >&6
8696else
8697  case $GZIP in
8698  [\\/]* | ?:[\\/]*)
8699  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8700  ;;
8701  *)
8702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8703for as_dir in $PATH
8704do
8705  IFS=$as_save_IFS
8706  test -z "$as_dir" && as_dir=.
8707    for ac_exec_ext in '' $ac_executable_extensions; do
8708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8709    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8711    break 2
8712  fi
8713done
8714  done
8715IFS=$as_save_IFS
8716
8717  ;;
8718esac
8719fi
8720GZIP=$ac_cv_path_GZIP
8721if test -n "$GZIP"; then
8722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8723$as_echo "$GZIP" >&6; }
8724else
8725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726$as_echo "no" >&6; }
8727fi
8728
8729
8730  test -n "$GZIP" && break
8731done
8732
8733    else
8734      # If it succeeded, then it was overridden by the user. We will use it
8735      # for the tool.
8736
8737      # First remove it from the list of overridden variables, so we can test
8738      # for unknown variables in the end.
8739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8740
8741      # Check if we try to supply an empty value
8742      if test "x$GZIP" = x; then
8743        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8744$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8745        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8746$as_echo_n "checking for GZIP... " >&6; }
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8748$as_echo "disabled" >&6; }
8749      else
8750        # Check if the provided tool contains a complete path.
8751        tool_specified="$GZIP"
8752        tool_basename="${tool_specified##*/}"
8753        if test "x$tool_basename" = "x$tool_specified"; then
8754          # A command without a complete path is provided, search $PATH.
8755          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8756$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8757          # Extract the first word of "$tool_basename", so it can be a program name with args.
8758set dummy $tool_basename; ac_word=$2
8759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8760$as_echo_n "checking for $ac_word... " >&6; }
8761if ${ac_cv_path_GZIP+:} false; then :
8762  $as_echo_n "(cached) " >&6
8763else
8764  case $GZIP in
8765  [\\/]* | ?:[\\/]*)
8766  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8767  ;;
8768  *)
8769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8770for as_dir in $PATH
8771do
8772  IFS=$as_save_IFS
8773  test -z "$as_dir" && as_dir=.
8774    for ac_exec_ext in '' $ac_executable_extensions; do
8775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8776    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8778    break 2
8779  fi
8780done
8781  done
8782IFS=$as_save_IFS
8783
8784  ;;
8785esac
8786fi
8787GZIP=$ac_cv_path_GZIP
8788if test -n "$GZIP"; then
8789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8790$as_echo "$GZIP" >&6; }
8791else
8792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793$as_echo "no" >&6; }
8794fi
8795
8796
8797          if test "x$GZIP" = x; then
8798            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8799          fi
8800        else
8801          # Otherwise we believe it is a complete path. Use it as it is.
8802          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8803$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8804          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8805$as_echo_n "checking for GZIP... " >&6; }
8806          if test ! -x "$tool_specified"; then
8807            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8808$as_echo "not found" >&6; }
8809            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8810          fi
8811          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8812$as_echo "$tool_specified" >&6; }
8813        fi
8814      fi
8815    fi
8816
8817  fi
8818
8819
8820
8821  if test "x$GZIP" = x; then
8822    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8823  fi
8824
8825
8826
8827
8828
8829  # Publish this variable in the help.
8830
8831
8832  if [ -z "${LN+x}" ]; then
8833    # The variable is not set by user, try to locate tool using the code snippet
8834    for ac_prog in ln
8835do
8836  # Extract the first word of "$ac_prog", so it can be a program name with args.
8837set dummy $ac_prog; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if ${ac_cv_path_LN+:} false; then :
8841  $as_echo_n "(cached) " >&6
8842else
8843  case $LN in
8844  [\\/]* | ?:[\\/]*)
8845  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8846  ;;
8847  *)
8848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849for as_dir in $PATH
8850do
8851  IFS=$as_save_IFS
8852  test -z "$as_dir" && as_dir=.
8853    for ac_exec_ext in '' $ac_executable_extensions; do
8854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8855    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857    break 2
8858  fi
8859done
8860  done
8861IFS=$as_save_IFS
8862
8863  ;;
8864esac
8865fi
8866LN=$ac_cv_path_LN
8867if test -n "$LN"; then
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8869$as_echo "$LN" >&6; }
8870else
8871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
8873fi
8874
8875
8876  test -n "$LN" && break
8877done
8878
8879  else
8880    # The variable is set, but is it from the command line or the environment?
8881
8882    # Try to remove the string !LN! from our list.
8883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8885      # If it failed, the variable was not from the command line. Ignore it,
8886      # but warn the user (except for BASH, which is always set by the calling BASH).
8887      if test "xLN" != xBASH; then
8888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8889$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8890      fi
8891      # Try to locate tool using the code snippet
8892      for ac_prog in ln
8893do
8894  # Extract the first word of "$ac_prog", so it can be a program name with args.
8895set dummy $ac_prog; ac_word=$2
8896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8897$as_echo_n "checking for $ac_word... " >&6; }
8898if ${ac_cv_path_LN+:} false; then :
8899  $as_echo_n "(cached) " >&6
8900else
8901  case $LN in
8902  [\\/]* | ?:[\\/]*)
8903  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8904  ;;
8905  *)
8906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8907for as_dir in $PATH
8908do
8909  IFS=$as_save_IFS
8910  test -z "$as_dir" && as_dir=.
8911    for ac_exec_ext in '' $ac_executable_extensions; do
8912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8913    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8915    break 2
8916  fi
8917done
8918  done
8919IFS=$as_save_IFS
8920
8921  ;;
8922esac
8923fi
8924LN=$ac_cv_path_LN
8925if test -n "$LN"; then
8926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8927$as_echo "$LN" >&6; }
8928else
8929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8930$as_echo "no" >&6; }
8931fi
8932
8933
8934  test -n "$LN" && break
8935done
8936
8937    else
8938      # If it succeeded, then it was overridden by the user. We will use it
8939      # for the tool.
8940
8941      # First remove it from the list of overridden variables, so we can test
8942      # for unknown variables in the end.
8943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8944
8945      # Check if we try to supply an empty value
8946      if test "x$LN" = x; then
8947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8948$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8950$as_echo_n "checking for LN... " >&6; }
8951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8952$as_echo "disabled" >&6; }
8953      else
8954        # Check if the provided tool contains a complete path.
8955        tool_specified="$LN"
8956        tool_basename="${tool_specified##*/}"
8957        if test "x$tool_basename" = "x$tool_specified"; then
8958          # A command without a complete path is provided, search $PATH.
8959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8960$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8961          # Extract the first word of "$tool_basename", so it can be a program name with args.
8962set dummy $tool_basename; ac_word=$2
8963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8964$as_echo_n "checking for $ac_word... " >&6; }
8965if ${ac_cv_path_LN+:} false; then :
8966  $as_echo_n "(cached) " >&6
8967else
8968  case $LN in
8969  [\\/]* | ?:[\\/]*)
8970  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8971  ;;
8972  *)
8973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8974for as_dir in $PATH
8975do
8976  IFS=$as_save_IFS
8977  test -z "$as_dir" && as_dir=.
8978    for ac_exec_ext in '' $ac_executable_extensions; do
8979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8980    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8982    break 2
8983  fi
8984done
8985  done
8986IFS=$as_save_IFS
8987
8988  ;;
8989esac
8990fi
8991LN=$ac_cv_path_LN
8992if test -n "$LN"; then
8993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8994$as_echo "$LN" >&6; }
8995else
8996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8997$as_echo "no" >&6; }
8998fi
8999
9000
9001          if test "x$LN" = x; then
9002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9003          fi
9004        else
9005          # Otherwise we believe it is a complete path. Use it as it is.
9006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9007$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9009$as_echo_n "checking for LN... " >&6; }
9010          if test ! -x "$tool_specified"; then
9011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9012$as_echo "not found" >&6; }
9013            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9014          fi
9015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9016$as_echo "$tool_specified" >&6; }
9017        fi
9018      fi
9019    fi
9020
9021  fi
9022
9023
9024
9025  if test "x$LN" = x; then
9026    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9027  fi
9028
9029
9030
9031
9032
9033  # Publish this variable in the help.
9034
9035
9036  if [ -z "${LS+x}" ]; then
9037    # The variable is not set by user, try to locate tool using the code snippet
9038    for ac_prog in ls
9039do
9040  # Extract the first word of "$ac_prog", so it can be a program name with args.
9041set dummy $ac_prog; ac_word=$2
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9043$as_echo_n "checking for $ac_word... " >&6; }
9044if ${ac_cv_path_LS+:} false; then :
9045  $as_echo_n "(cached) " >&6
9046else
9047  case $LS in
9048  [\\/]* | ?:[\\/]*)
9049  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9050  ;;
9051  *)
9052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9053for as_dir in $PATH
9054do
9055  IFS=$as_save_IFS
9056  test -z "$as_dir" && as_dir=.
9057    for ac_exec_ext in '' $ac_executable_extensions; do
9058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9059    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9061    break 2
9062  fi
9063done
9064  done
9065IFS=$as_save_IFS
9066
9067  ;;
9068esac
9069fi
9070LS=$ac_cv_path_LS
9071if test -n "$LS"; then
9072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9073$as_echo "$LS" >&6; }
9074else
9075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076$as_echo "no" >&6; }
9077fi
9078
9079
9080  test -n "$LS" && break
9081done
9082
9083  else
9084    # The variable is set, but is it from the command line or the environment?
9085
9086    # Try to remove the string !LS! from our list.
9087    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9088    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9089      # If it failed, the variable was not from the command line. Ignore it,
9090      # but warn the user (except for BASH, which is always set by the calling BASH).
9091      if test "xLS" != xBASH; then
9092        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9093$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9094      fi
9095      # Try to locate tool using the code snippet
9096      for ac_prog in ls
9097do
9098  # Extract the first word of "$ac_prog", so it can be a program name with args.
9099set dummy $ac_prog; ac_word=$2
9100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9101$as_echo_n "checking for $ac_word... " >&6; }
9102if ${ac_cv_path_LS+:} false; then :
9103  $as_echo_n "(cached) " >&6
9104else
9105  case $LS in
9106  [\\/]* | ?:[\\/]*)
9107  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9108  ;;
9109  *)
9110  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9111for as_dir in $PATH
9112do
9113  IFS=$as_save_IFS
9114  test -z "$as_dir" && as_dir=.
9115    for ac_exec_ext in '' $ac_executable_extensions; do
9116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9117    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9119    break 2
9120  fi
9121done
9122  done
9123IFS=$as_save_IFS
9124
9125  ;;
9126esac
9127fi
9128LS=$ac_cv_path_LS
9129if test -n "$LS"; then
9130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9131$as_echo "$LS" >&6; }
9132else
9133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135fi
9136
9137
9138  test -n "$LS" && break
9139done
9140
9141    else
9142      # If it succeeded, then it was overridden by the user. We will use it
9143      # for the tool.
9144
9145      # First remove it from the list of overridden variables, so we can test
9146      # for unknown variables in the end.
9147      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9148
9149      # Check if we try to supply an empty value
9150      if test "x$LS" = x; then
9151        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9152$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9153        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9154$as_echo_n "checking for LS... " >&6; }
9155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9156$as_echo "disabled" >&6; }
9157      else
9158        # Check if the provided tool contains a complete path.
9159        tool_specified="$LS"
9160        tool_basename="${tool_specified##*/}"
9161        if test "x$tool_basename" = "x$tool_specified"; then
9162          # A command without a complete path is provided, search $PATH.
9163          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9164$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9165          # Extract the first word of "$tool_basename", so it can be a program name with args.
9166set dummy $tool_basename; ac_word=$2
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9168$as_echo_n "checking for $ac_word... " >&6; }
9169if ${ac_cv_path_LS+:} false; then :
9170  $as_echo_n "(cached) " >&6
9171else
9172  case $LS in
9173  [\\/]* | ?:[\\/]*)
9174  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9175  ;;
9176  *)
9177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9178for as_dir in $PATH
9179do
9180  IFS=$as_save_IFS
9181  test -z "$as_dir" && as_dir=.
9182    for ac_exec_ext in '' $ac_executable_extensions; do
9183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9184    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9186    break 2
9187  fi
9188done
9189  done
9190IFS=$as_save_IFS
9191
9192  ;;
9193esac
9194fi
9195LS=$ac_cv_path_LS
9196if test -n "$LS"; then
9197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9198$as_echo "$LS" >&6; }
9199else
9200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202fi
9203
9204
9205          if test "x$LS" = x; then
9206            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9207          fi
9208        else
9209          # Otherwise we believe it is a complete path. Use it as it is.
9210          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9211$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9212          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9213$as_echo_n "checking for LS... " >&6; }
9214          if test ! -x "$tool_specified"; then
9215            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9216$as_echo "not found" >&6; }
9217            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9218          fi
9219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9220$as_echo "$tool_specified" >&6; }
9221        fi
9222      fi
9223    fi
9224
9225  fi
9226
9227
9228
9229  if test "x$LS" = x; then
9230    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9231  fi
9232
9233
9234
9235
9236
9237  # Publish this variable in the help.
9238
9239
9240  if [ -z "${MKDIR+x}" ]; then
9241    # The variable is not set by user, try to locate tool using the code snippet
9242    for ac_prog in mkdir
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
9248if ${ac_cv_path_MKDIR+:} false; then :
9249  $as_echo_n "(cached) " >&6
9250else
9251  case $MKDIR in
9252  [\\/]* | ?:[\\/]*)
9253  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9254  ;;
9255  *)
9256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259  IFS=$as_save_IFS
9260  test -z "$as_dir" && as_dir=.
9261    for ac_exec_ext in '' $ac_executable_extensions; do
9262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9263    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265    break 2
9266  fi
9267done
9268  done
9269IFS=$as_save_IFS
9270
9271  ;;
9272esac
9273fi
9274MKDIR=$ac_cv_path_MKDIR
9275if test -n "$MKDIR"; then
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9277$as_echo "$MKDIR" >&6; }
9278else
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
9281fi
9282
9283
9284  test -n "$MKDIR" && break
9285done
9286
9287  else
9288    # The variable is set, but is it from the command line or the environment?
9289
9290    # Try to remove the string !MKDIR! from our list.
9291    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9292    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9293      # If it failed, the variable was not from the command line. Ignore it,
9294      # but warn the user (except for BASH, which is always set by the calling BASH).
9295      if test "xMKDIR" != xBASH; then
9296        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9297$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9298      fi
9299      # Try to locate tool using the code snippet
9300      for ac_prog in mkdir
9301do
9302  # Extract the first word of "$ac_prog", so it can be a program name with args.
9303set dummy $ac_prog; ac_word=$2
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9305$as_echo_n "checking for $ac_word... " >&6; }
9306if ${ac_cv_path_MKDIR+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  case $MKDIR in
9310  [\\/]* | ?:[\\/]*)
9311  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9312  ;;
9313  *)
9314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9315for as_dir in $PATH
9316do
9317  IFS=$as_save_IFS
9318  test -z "$as_dir" && as_dir=.
9319    for ac_exec_ext in '' $ac_executable_extensions; do
9320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9321    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9323    break 2
9324  fi
9325done
9326  done
9327IFS=$as_save_IFS
9328
9329  ;;
9330esac
9331fi
9332MKDIR=$ac_cv_path_MKDIR
9333if test -n "$MKDIR"; then
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9335$as_echo "$MKDIR" >&6; }
9336else
9337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339fi
9340
9341
9342  test -n "$MKDIR" && break
9343done
9344
9345    else
9346      # If it succeeded, then it was overridden by the user. We will use it
9347      # for the tool.
9348
9349      # First remove it from the list of overridden variables, so we can test
9350      # for unknown variables in the end.
9351      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9352
9353      # Check if we try to supply an empty value
9354      if test "x$MKDIR" = x; then
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9356$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9358$as_echo_n "checking for MKDIR... " >&6; }
9359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9360$as_echo "disabled" >&6; }
9361      else
9362        # Check if the provided tool contains a complete path.
9363        tool_specified="$MKDIR"
9364        tool_basename="${tool_specified##*/}"
9365        if test "x$tool_basename" = "x$tool_specified"; then
9366          # A command without a complete path is provided, search $PATH.
9367          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9368$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9369          # Extract the first word of "$tool_basename", so it can be a program name with args.
9370set dummy $tool_basename; ac_word=$2
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9372$as_echo_n "checking for $ac_word... " >&6; }
9373if ${ac_cv_path_MKDIR+:} false; then :
9374  $as_echo_n "(cached) " >&6
9375else
9376  case $MKDIR in
9377  [\\/]* | ?:[\\/]*)
9378  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9379  ;;
9380  *)
9381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9382for as_dir in $PATH
9383do
9384  IFS=$as_save_IFS
9385  test -z "$as_dir" && as_dir=.
9386    for ac_exec_ext in '' $ac_executable_extensions; do
9387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9388    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9390    break 2
9391  fi
9392done
9393  done
9394IFS=$as_save_IFS
9395
9396  ;;
9397esac
9398fi
9399MKDIR=$ac_cv_path_MKDIR
9400if test -n "$MKDIR"; then
9401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9402$as_echo "$MKDIR" >&6; }
9403else
9404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9405$as_echo "no" >&6; }
9406fi
9407
9408
9409          if test "x$MKDIR" = x; then
9410            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9411          fi
9412        else
9413          # Otherwise we believe it is a complete path. Use it as it is.
9414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9415$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9416          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9417$as_echo_n "checking for MKDIR... " >&6; }
9418          if test ! -x "$tool_specified"; then
9419            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9420$as_echo "not found" >&6; }
9421            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9422          fi
9423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9424$as_echo "$tool_specified" >&6; }
9425        fi
9426      fi
9427    fi
9428
9429  fi
9430
9431
9432
9433  if test "x$MKDIR" = x; then
9434    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9435  fi
9436
9437
9438
9439
9440
9441  # Publish this variable in the help.
9442
9443
9444  if [ -z "${MKTEMP+x}" ]; then
9445    # The variable is not set by user, try to locate tool using the code snippet
9446    for ac_prog in mktemp
9447do
9448  # Extract the first word of "$ac_prog", so it can be a program name with args.
9449set dummy $ac_prog; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_MKTEMP+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $MKTEMP in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478MKTEMP=$ac_cv_path_MKTEMP
9479if test -n "$MKTEMP"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9481$as_echo "$MKTEMP" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488  test -n "$MKTEMP" && break
9489done
9490
9491  else
9492    # The variable is set, but is it from the command line or the environment?
9493
9494    # Try to remove the string !MKTEMP! from our list.
9495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9497      # If it failed, the variable was not from the command line. Ignore it,
9498      # but warn the user (except for BASH, which is always set by the calling BASH).
9499      if test "xMKTEMP" != xBASH; then
9500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9501$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9502      fi
9503      # Try to locate tool using the code snippet
9504      for ac_prog in mktemp
9505do
9506  # Extract the first word of "$ac_prog", so it can be a program name with args.
9507set dummy $ac_prog; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_MKTEMP+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $MKTEMP in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536MKTEMP=$ac_cv_path_MKTEMP
9537if test -n "$MKTEMP"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9539$as_echo "$MKTEMP" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546  test -n "$MKTEMP" && break
9547done
9548
9549    else
9550      # If it succeeded, then it was overridden by the user. We will use it
9551      # for the tool.
9552
9553      # First remove it from the list of overridden variables, so we can test
9554      # for unknown variables in the end.
9555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9556
9557      # Check if we try to supply an empty value
9558      if test "x$MKTEMP" = x; then
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9560$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9562$as_echo_n "checking for MKTEMP... " >&6; }
9563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9564$as_echo "disabled" >&6; }
9565      else
9566        # Check if the provided tool contains a complete path.
9567        tool_specified="$MKTEMP"
9568        tool_basename="${tool_specified##*/}"
9569        if test "x$tool_basename" = "x$tool_specified"; then
9570          # A command without a complete path is provided, search $PATH.
9571          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9572$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9573          # Extract the first word of "$tool_basename", so it can be a program name with args.
9574set dummy $tool_basename; ac_word=$2
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9576$as_echo_n "checking for $ac_word... " >&6; }
9577if ${ac_cv_path_MKTEMP+:} false; then :
9578  $as_echo_n "(cached) " >&6
9579else
9580  case $MKTEMP in
9581  [\\/]* | ?:[\\/]*)
9582  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9583  ;;
9584  *)
9585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9586for as_dir in $PATH
9587do
9588  IFS=$as_save_IFS
9589  test -z "$as_dir" && as_dir=.
9590    for ac_exec_ext in '' $ac_executable_extensions; do
9591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9592    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9594    break 2
9595  fi
9596done
9597  done
9598IFS=$as_save_IFS
9599
9600  ;;
9601esac
9602fi
9603MKTEMP=$ac_cv_path_MKTEMP
9604if test -n "$MKTEMP"; then
9605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9606$as_echo "$MKTEMP" >&6; }
9607else
9608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
9610fi
9611
9612
9613          if test "x$MKTEMP" = x; then
9614            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9615          fi
9616        else
9617          # Otherwise we believe it is a complete path. Use it as it is.
9618          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9619$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9620          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9621$as_echo_n "checking for MKTEMP... " >&6; }
9622          if test ! -x "$tool_specified"; then
9623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9624$as_echo "not found" >&6; }
9625            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9626          fi
9627          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9628$as_echo "$tool_specified" >&6; }
9629        fi
9630      fi
9631    fi
9632
9633  fi
9634
9635
9636
9637  if test "x$MKTEMP" = x; then
9638    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9639  fi
9640
9641
9642
9643
9644
9645  # Publish this variable in the help.
9646
9647
9648  if [ -z "${MV+x}" ]; then
9649    # The variable is not set by user, try to locate tool using the code snippet
9650    for ac_prog in mv
9651do
9652  # Extract the first word of "$ac_prog", so it can be a program name with args.
9653set dummy $ac_prog; ac_word=$2
9654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9655$as_echo_n "checking for $ac_word... " >&6; }
9656if ${ac_cv_path_MV+:} false; then :
9657  $as_echo_n "(cached) " >&6
9658else
9659  case $MV in
9660  [\\/]* | ?:[\\/]*)
9661  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9662  ;;
9663  *)
9664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665for as_dir in $PATH
9666do
9667  IFS=$as_save_IFS
9668  test -z "$as_dir" && as_dir=.
9669    for ac_exec_ext in '' $ac_executable_extensions; do
9670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673    break 2
9674  fi
9675done
9676  done
9677IFS=$as_save_IFS
9678
9679  ;;
9680esac
9681fi
9682MV=$ac_cv_path_MV
9683if test -n "$MV"; then
9684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9685$as_echo "$MV" >&6; }
9686else
9687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
9689fi
9690
9691
9692  test -n "$MV" && break
9693done
9694
9695  else
9696    # The variable is set, but is it from the command line or the environment?
9697
9698    # Try to remove the string !MV! from our list.
9699    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9700    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9701      # If it failed, the variable was not from the command line. Ignore it,
9702      # but warn the user (except for BASH, which is always set by the calling BASH).
9703      if test "xMV" != xBASH; then
9704        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9705$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9706      fi
9707      # Try to locate tool using the code snippet
9708      for ac_prog in mv
9709do
9710  # Extract the first word of "$ac_prog", so it can be a program name with args.
9711set dummy $ac_prog; ac_word=$2
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9713$as_echo_n "checking for $ac_word... " >&6; }
9714if ${ac_cv_path_MV+:} false; then :
9715  $as_echo_n "(cached) " >&6
9716else
9717  case $MV in
9718  [\\/]* | ?:[\\/]*)
9719  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9720  ;;
9721  *)
9722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9723for as_dir in $PATH
9724do
9725  IFS=$as_save_IFS
9726  test -z "$as_dir" && as_dir=.
9727    for ac_exec_ext in '' $ac_executable_extensions; do
9728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9729    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9731    break 2
9732  fi
9733done
9734  done
9735IFS=$as_save_IFS
9736
9737  ;;
9738esac
9739fi
9740MV=$ac_cv_path_MV
9741if test -n "$MV"; then
9742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9743$as_echo "$MV" >&6; }
9744else
9745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
9747fi
9748
9749
9750  test -n "$MV" && break
9751done
9752
9753    else
9754      # If it succeeded, then it was overridden by the user. We will use it
9755      # for the tool.
9756
9757      # First remove it from the list of overridden variables, so we can test
9758      # for unknown variables in the end.
9759      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9760
9761      # Check if we try to supply an empty value
9762      if test "x$MV" = x; then
9763        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9764$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9766$as_echo_n "checking for MV... " >&6; }
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9768$as_echo "disabled" >&6; }
9769      else
9770        # Check if the provided tool contains a complete path.
9771        tool_specified="$MV"
9772        tool_basename="${tool_specified##*/}"
9773        if test "x$tool_basename" = "x$tool_specified"; then
9774          # A command without a complete path is provided, search $PATH.
9775          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9776$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9777          # Extract the first word of "$tool_basename", so it can be a program name with args.
9778set dummy $tool_basename; ac_word=$2
9779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9780$as_echo_n "checking for $ac_word... " >&6; }
9781if ${ac_cv_path_MV+:} false; then :
9782  $as_echo_n "(cached) " >&6
9783else
9784  case $MV in
9785  [\\/]* | ?:[\\/]*)
9786  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9787  ;;
9788  *)
9789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9790for as_dir in $PATH
9791do
9792  IFS=$as_save_IFS
9793  test -z "$as_dir" && as_dir=.
9794    for ac_exec_ext in '' $ac_executable_extensions; do
9795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9796    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9798    break 2
9799  fi
9800done
9801  done
9802IFS=$as_save_IFS
9803
9804  ;;
9805esac
9806fi
9807MV=$ac_cv_path_MV
9808if test -n "$MV"; then
9809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9810$as_echo "$MV" >&6; }
9811else
9812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9813$as_echo "no" >&6; }
9814fi
9815
9816
9817          if test "x$MV" = x; then
9818            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9819          fi
9820        else
9821          # Otherwise we believe it is a complete path. Use it as it is.
9822          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9823$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9824          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9825$as_echo_n "checking for MV... " >&6; }
9826          if test ! -x "$tool_specified"; then
9827            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9828$as_echo "not found" >&6; }
9829            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9830          fi
9831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9832$as_echo "$tool_specified" >&6; }
9833        fi
9834      fi
9835    fi
9836
9837  fi
9838
9839
9840
9841  if test "x$MV" = x; then
9842    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9843  fi
9844
9845
9846
9847
9848
9849  # Publish this variable in the help.
9850
9851
9852  if [ -z "${NAWK+x}" ]; then
9853    # The variable is not set by user, try to locate tool using the code snippet
9854    for ac_prog in nawk gawk awk
9855do
9856  # Extract the first word of "$ac_prog", so it can be a program name with args.
9857set dummy $ac_prog; ac_word=$2
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9859$as_echo_n "checking for $ac_word... " >&6; }
9860if ${ac_cv_path_NAWK+:} false; then :
9861  $as_echo_n "(cached) " >&6
9862else
9863  case $NAWK in
9864  [\\/]* | ?:[\\/]*)
9865  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9866  ;;
9867  *)
9868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9869for as_dir in $PATH
9870do
9871  IFS=$as_save_IFS
9872  test -z "$as_dir" && as_dir=.
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9875    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883  ;;
9884esac
9885fi
9886NAWK=$ac_cv_path_NAWK
9887if test -n "$NAWK"; then
9888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9889$as_echo "$NAWK" >&6; }
9890else
9891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9892$as_echo "no" >&6; }
9893fi
9894
9895
9896  test -n "$NAWK" && break
9897done
9898
9899  else
9900    # The variable is set, but is it from the command line or the environment?
9901
9902    # Try to remove the string !NAWK! from our list.
9903    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9904    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9905      # If it failed, the variable was not from the command line. Ignore it,
9906      # but warn the user (except for BASH, which is always set by the calling BASH).
9907      if test "xNAWK" != xBASH; then
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9909$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9910      fi
9911      # Try to locate tool using the code snippet
9912      for ac_prog in nawk gawk awk
9913do
9914  # Extract the first word of "$ac_prog", so it can be a program name with args.
9915set dummy $ac_prog; ac_word=$2
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9917$as_echo_n "checking for $ac_word... " >&6; }
9918if ${ac_cv_path_NAWK+:} false; then :
9919  $as_echo_n "(cached) " >&6
9920else
9921  case $NAWK in
9922  [\\/]* | ?:[\\/]*)
9923  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9924  ;;
9925  *)
9926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9927for as_dir in $PATH
9928do
9929  IFS=$as_save_IFS
9930  test -z "$as_dir" && as_dir=.
9931    for ac_exec_ext in '' $ac_executable_extensions; do
9932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9933    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9935    break 2
9936  fi
9937done
9938  done
9939IFS=$as_save_IFS
9940
9941  ;;
9942esac
9943fi
9944NAWK=$ac_cv_path_NAWK
9945if test -n "$NAWK"; then
9946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9947$as_echo "$NAWK" >&6; }
9948else
9949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9950$as_echo "no" >&6; }
9951fi
9952
9953
9954  test -n "$NAWK" && break
9955done
9956
9957    else
9958      # If it succeeded, then it was overridden by the user. We will use it
9959      # for the tool.
9960
9961      # First remove it from the list of overridden variables, so we can test
9962      # for unknown variables in the end.
9963      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9964
9965      # Check if we try to supply an empty value
9966      if test "x$NAWK" = x; then
9967        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9968$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9970$as_echo_n "checking for NAWK... " >&6; }
9971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9972$as_echo "disabled" >&6; }
9973      else
9974        # Check if the provided tool contains a complete path.
9975        tool_specified="$NAWK"
9976        tool_basename="${tool_specified##*/}"
9977        if test "x$tool_basename" = "x$tool_specified"; then
9978          # A command without a complete path is provided, search $PATH.
9979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9980$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9981          # Extract the first word of "$tool_basename", so it can be a program name with args.
9982set dummy $tool_basename; ac_word=$2
9983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9984$as_echo_n "checking for $ac_word... " >&6; }
9985if ${ac_cv_path_NAWK+:} false; then :
9986  $as_echo_n "(cached) " >&6
9987else
9988  case $NAWK in
9989  [\\/]* | ?:[\\/]*)
9990  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9991  ;;
9992  *)
9993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9994for as_dir in $PATH
9995do
9996  IFS=$as_save_IFS
9997  test -z "$as_dir" && as_dir=.
9998    for ac_exec_ext in '' $ac_executable_extensions; do
9999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10000    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10002    break 2
10003  fi
10004done
10005  done
10006IFS=$as_save_IFS
10007
10008  ;;
10009esac
10010fi
10011NAWK=$ac_cv_path_NAWK
10012if test -n "$NAWK"; then
10013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10014$as_echo "$NAWK" >&6; }
10015else
10016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10017$as_echo "no" >&6; }
10018fi
10019
10020
10021          if test "x$NAWK" = x; then
10022            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10023          fi
10024        else
10025          # Otherwise we believe it is a complete path. Use it as it is.
10026          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10027$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10028          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10029$as_echo_n "checking for NAWK... " >&6; }
10030          if test ! -x "$tool_specified"; then
10031            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10032$as_echo "not found" >&6; }
10033            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10034          fi
10035          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10036$as_echo "$tool_specified" >&6; }
10037        fi
10038      fi
10039    fi
10040
10041  fi
10042
10043
10044
10045  if test "x$NAWK" = x; then
10046    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10047  fi
10048
10049
10050
10051
10052
10053  # Publish this variable in the help.
10054
10055
10056  if [ -z "${PRINTF+x}" ]; then
10057    # The variable is not set by user, try to locate tool using the code snippet
10058    for ac_prog in printf
10059do
10060  # Extract the first word of "$ac_prog", so it can be a program name with args.
10061set dummy $ac_prog; ac_word=$2
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063$as_echo_n "checking for $ac_word... " >&6; }
10064if ${ac_cv_path_PRINTF+:} false; then :
10065  $as_echo_n "(cached) " >&6
10066else
10067  case $PRINTF in
10068  [\\/]* | ?:[\\/]*)
10069  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10070  ;;
10071  *)
10072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073for as_dir in $PATH
10074do
10075  IFS=$as_save_IFS
10076  test -z "$as_dir" && as_dir=.
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10079    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087  ;;
10088esac
10089fi
10090PRINTF=$ac_cv_path_PRINTF
10091if test -n "$PRINTF"; then
10092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10093$as_echo "$PRINTF" >&6; }
10094else
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
10097fi
10098
10099
10100  test -n "$PRINTF" && break
10101done
10102
10103  else
10104    # The variable is set, but is it from the command line or the environment?
10105
10106    # Try to remove the string !PRINTF! from our list.
10107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10109      # If it failed, the variable was not from the command line. Ignore it,
10110      # but warn the user (except for BASH, which is always set by the calling BASH).
10111      if test "xPRINTF" != xBASH; then
10112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10113$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10114      fi
10115      # Try to locate tool using the code snippet
10116      for ac_prog in printf
10117do
10118  # Extract the first word of "$ac_prog", so it can be a program name with args.
10119set dummy $ac_prog; ac_word=$2
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10121$as_echo_n "checking for $ac_word... " >&6; }
10122if ${ac_cv_path_PRINTF+:} false; then :
10123  $as_echo_n "(cached) " >&6
10124else
10125  case $PRINTF in
10126  [\\/]* | ?:[\\/]*)
10127  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10128  ;;
10129  *)
10130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10131for as_dir in $PATH
10132do
10133  IFS=$as_save_IFS
10134  test -z "$as_dir" && as_dir=.
10135    for ac_exec_ext in '' $ac_executable_extensions; do
10136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10137    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10139    break 2
10140  fi
10141done
10142  done
10143IFS=$as_save_IFS
10144
10145  ;;
10146esac
10147fi
10148PRINTF=$ac_cv_path_PRINTF
10149if test -n "$PRINTF"; then
10150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10151$as_echo "$PRINTF" >&6; }
10152else
10153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
10155fi
10156
10157
10158  test -n "$PRINTF" && break
10159done
10160
10161    else
10162      # If it succeeded, then it was overridden by the user. We will use it
10163      # for the tool.
10164
10165      # First remove it from the list of overridden variables, so we can test
10166      # for unknown variables in the end.
10167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10168
10169      # Check if we try to supply an empty value
10170      if test "x$PRINTF" = x; then
10171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10172$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10174$as_echo_n "checking for PRINTF... " >&6; }
10175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10176$as_echo "disabled" >&6; }
10177      else
10178        # Check if the provided tool contains a complete path.
10179        tool_specified="$PRINTF"
10180        tool_basename="${tool_specified##*/}"
10181        if test "x$tool_basename" = "x$tool_specified"; then
10182          # A command without a complete path is provided, search $PATH.
10183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10184$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10185          # Extract the first word of "$tool_basename", so it can be a program name with args.
10186set dummy $tool_basename; ac_word=$2
10187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10188$as_echo_n "checking for $ac_word... " >&6; }
10189if ${ac_cv_path_PRINTF+:} false; then :
10190  $as_echo_n "(cached) " >&6
10191else
10192  case $PRINTF in
10193  [\\/]* | ?:[\\/]*)
10194  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10195  ;;
10196  *)
10197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10198for as_dir in $PATH
10199do
10200  IFS=$as_save_IFS
10201  test -z "$as_dir" && as_dir=.
10202    for ac_exec_ext in '' $ac_executable_extensions; do
10203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10204    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10206    break 2
10207  fi
10208done
10209  done
10210IFS=$as_save_IFS
10211
10212  ;;
10213esac
10214fi
10215PRINTF=$ac_cv_path_PRINTF
10216if test -n "$PRINTF"; then
10217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10218$as_echo "$PRINTF" >&6; }
10219else
10220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10221$as_echo "no" >&6; }
10222fi
10223
10224
10225          if test "x$PRINTF" = x; then
10226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10227          fi
10228        else
10229          # Otherwise we believe it is a complete path. Use it as it is.
10230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10231$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10233$as_echo_n "checking for PRINTF... " >&6; }
10234          if test ! -x "$tool_specified"; then
10235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10236$as_echo "not found" >&6; }
10237            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10238          fi
10239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10240$as_echo "$tool_specified" >&6; }
10241        fi
10242      fi
10243    fi
10244
10245  fi
10246
10247
10248
10249  if test "x$PRINTF" = x; then
10250    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10251  fi
10252
10253
10254
10255
10256
10257  # Publish this variable in the help.
10258
10259
10260  if [ -z "${RM+x}" ]; then
10261    # The variable is not set by user, try to locate tool using the code snippet
10262    for ac_prog in rm
10263do
10264  # Extract the first word of "$ac_prog", so it can be a program name with args.
10265set dummy $ac_prog; ac_word=$2
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267$as_echo_n "checking for $ac_word... " >&6; }
10268if ${ac_cv_path_RM+:} false; then :
10269  $as_echo_n "(cached) " >&6
10270else
10271  case $RM in
10272  [\\/]* | ?:[\\/]*)
10273  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10274  ;;
10275  *)
10276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279  IFS=$as_save_IFS
10280  test -z "$as_dir" && as_dir=.
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291  ;;
10292esac
10293fi
10294RM=$ac_cv_path_RM
10295if test -n "$RM"; then
10296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10297$as_echo "$RM" >&6; }
10298else
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303
10304  test -n "$RM" && break
10305done
10306
10307  else
10308    # The variable is set, but is it from the command line or the environment?
10309
10310    # Try to remove the string !RM! from our list.
10311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10313      # If it failed, the variable was not from the command line. Ignore it,
10314      # but warn the user (except for BASH, which is always set by the calling BASH).
10315      if test "xRM" != xBASH; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10317$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10318      fi
10319      # Try to locate tool using the code snippet
10320      for ac_prog in rm
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_RM+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $RM in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352RM=$ac_cv_path_RM
10353if test -n "$RM"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10355$as_echo "$RM" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$RM" && break
10363done
10364
10365    else
10366      # If it succeeded, then it was overridden by the user. We will use it
10367      # for the tool.
10368
10369      # First remove it from the list of overridden variables, so we can test
10370      # for unknown variables in the end.
10371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10372
10373      # Check if we try to supply an empty value
10374      if test "x$RM" = x; then
10375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10376$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10378$as_echo_n "checking for RM... " >&6; }
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10380$as_echo "disabled" >&6; }
10381      else
10382        # Check if the provided tool contains a complete path.
10383        tool_specified="$RM"
10384        tool_basename="${tool_specified##*/}"
10385        if test "x$tool_basename" = "x$tool_specified"; then
10386          # A command without a complete path is provided, search $PATH.
10387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10388$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10389          # Extract the first word of "$tool_basename", so it can be a program name with args.
10390set dummy $tool_basename; ac_word=$2
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10392$as_echo_n "checking for $ac_word... " >&6; }
10393if ${ac_cv_path_RM+:} false; then :
10394  $as_echo_n "(cached) " >&6
10395else
10396  case $RM in
10397  [\\/]* | ?:[\\/]*)
10398  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10399  ;;
10400  *)
10401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10402for as_dir in $PATH
10403do
10404  IFS=$as_save_IFS
10405  test -z "$as_dir" && as_dir=.
10406    for ac_exec_ext in '' $ac_executable_extensions; do
10407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10408    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10410    break 2
10411  fi
10412done
10413  done
10414IFS=$as_save_IFS
10415
10416  ;;
10417esac
10418fi
10419RM=$ac_cv_path_RM
10420if test -n "$RM"; then
10421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10422$as_echo "$RM" >&6; }
10423else
10424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
10426fi
10427
10428
10429          if test "x$RM" = x; then
10430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10431          fi
10432        else
10433          # Otherwise we believe it is a complete path. Use it as it is.
10434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10435$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10437$as_echo_n "checking for RM... " >&6; }
10438          if test ! -x "$tool_specified"; then
10439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10440$as_echo "not found" >&6; }
10441            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10442          fi
10443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10444$as_echo "$tool_specified" >&6; }
10445        fi
10446      fi
10447    fi
10448
10449  fi
10450
10451
10452
10453  if test "x$RM" = x; then
10454    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10455  fi
10456
10457
10458
10459
10460
10461  # Publish this variable in the help.
10462
10463
10464  if [ -z "${RMDIR+x}" ]; then
10465    # The variable is not set by user, try to locate tool using the code snippet
10466    for ac_prog in rmdir
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_RMDIR+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $RMDIR in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498RMDIR=$ac_cv_path_RMDIR
10499if test -n "$RMDIR"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10501$as_echo "$RMDIR" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$RMDIR" && break
10509done
10510
10511  else
10512    # The variable is set, but is it from the command line or the environment?
10513
10514    # Try to remove the string !RMDIR! from our list.
10515    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10516    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10517      # If it failed, the variable was not from the command line. Ignore it,
10518      # but warn the user (except for BASH, which is always set by the calling BASH).
10519      if test "xRMDIR" != xBASH; then
10520        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10521$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10522      fi
10523      # Try to locate tool using the code snippet
10524      for ac_prog in rmdir
10525do
10526  # Extract the first word of "$ac_prog", so it can be a program name with args.
10527set dummy $ac_prog; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_RMDIR+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $RMDIR in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556RMDIR=$ac_cv_path_RMDIR
10557if test -n "$RMDIR"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10559$as_echo "$RMDIR" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566  test -n "$RMDIR" && break
10567done
10568
10569    else
10570      # If it succeeded, then it was overridden by the user. We will use it
10571      # for the tool.
10572
10573      # First remove it from the list of overridden variables, so we can test
10574      # for unknown variables in the end.
10575      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10576
10577      # Check if we try to supply an empty value
10578      if test "x$RMDIR" = x; then
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10580$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10582$as_echo_n "checking for RMDIR... " >&6; }
10583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10584$as_echo "disabled" >&6; }
10585      else
10586        # Check if the provided tool contains a complete path.
10587        tool_specified="$RMDIR"
10588        tool_basename="${tool_specified##*/}"
10589        if test "x$tool_basename" = "x$tool_specified"; then
10590          # A command without a complete path is provided, search $PATH.
10591          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10592$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10593          # Extract the first word of "$tool_basename", so it can be a program name with args.
10594set dummy $tool_basename; ac_word=$2
10595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10596$as_echo_n "checking for $ac_word... " >&6; }
10597if ${ac_cv_path_RMDIR+:} false; then :
10598  $as_echo_n "(cached) " >&6
10599else
10600  case $RMDIR in
10601  [\\/]* | ?:[\\/]*)
10602  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10603  ;;
10604  *)
10605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10606for as_dir in $PATH
10607do
10608  IFS=$as_save_IFS
10609  test -z "$as_dir" && as_dir=.
10610    for ac_exec_ext in '' $ac_executable_extensions; do
10611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10612    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10614    break 2
10615  fi
10616done
10617  done
10618IFS=$as_save_IFS
10619
10620  ;;
10621esac
10622fi
10623RMDIR=$ac_cv_path_RMDIR
10624if test -n "$RMDIR"; then
10625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10626$as_echo "$RMDIR" >&6; }
10627else
10628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10629$as_echo "no" >&6; }
10630fi
10631
10632
10633          if test "x$RMDIR" = x; then
10634            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10635          fi
10636        else
10637          # Otherwise we believe it is a complete path. Use it as it is.
10638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10639$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10640          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10641$as_echo_n "checking for RMDIR... " >&6; }
10642          if test ! -x "$tool_specified"; then
10643            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10644$as_echo "not found" >&6; }
10645            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10646          fi
10647          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10648$as_echo "$tool_specified" >&6; }
10649        fi
10650      fi
10651    fi
10652
10653  fi
10654
10655
10656
10657  if test "x$RMDIR" = x; then
10658    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10659  fi
10660
10661
10662
10663
10664
10665  # Publish this variable in the help.
10666
10667
10668  if [ -z "${SH+x}" ]; then
10669    # The variable is not set by user, try to locate tool using the code snippet
10670    for ac_prog in sh
10671do
10672  # Extract the first word of "$ac_prog", so it can be a program name with args.
10673set dummy $ac_prog; ac_word=$2
10674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10675$as_echo_n "checking for $ac_word... " >&6; }
10676if ${ac_cv_path_SH+:} false; then :
10677  $as_echo_n "(cached) " >&6
10678else
10679  case $SH in
10680  [\\/]* | ?:[\\/]*)
10681  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10682  ;;
10683  *)
10684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10685for as_dir in $PATH
10686do
10687  IFS=$as_save_IFS
10688  test -z "$as_dir" && as_dir=.
10689    for ac_exec_ext in '' $ac_executable_extensions; do
10690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10691    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10693    break 2
10694  fi
10695done
10696  done
10697IFS=$as_save_IFS
10698
10699  ;;
10700esac
10701fi
10702SH=$ac_cv_path_SH
10703if test -n "$SH"; then
10704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10705$as_echo "$SH" >&6; }
10706else
10707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
10709fi
10710
10711
10712  test -n "$SH" && break
10713done
10714
10715  else
10716    # The variable is set, but is it from the command line or the environment?
10717
10718    # Try to remove the string !SH! from our list.
10719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10721      # If it failed, the variable was not from the command line. Ignore it,
10722      # but warn the user (except for BASH, which is always set by the calling BASH).
10723      if test "xSH" != xBASH; then
10724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10725$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10726      fi
10727      # Try to locate tool using the code snippet
10728      for ac_prog in sh
10729do
10730  # Extract the first word of "$ac_prog", so it can be a program name with args.
10731set dummy $ac_prog; ac_word=$2
10732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10733$as_echo_n "checking for $ac_word... " >&6; }
10734if ${ac_cv_path_SH+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737  case $SH in
10738  [\\/]* | ?:[\\/]*)
10739  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10740  ;;
10741  *)
10742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10743for as_dir in $PATH
10744do
10745  IFS=$as_save_IFS
10746  test -z "$as_dir" && as_dir=.
10747    for ac_exec_ext in '' $ac_executable_extensions; do
10748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10749    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10751    break 2
10752  fi
10753done
10754  done
10755IFS=$as_save_IFS
10756
10757  ;;
10758esac
10759fi
10760SH=$ac_cv_path_SH
10761if test -n "$SH"; then
10762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10763$as_echo "$SH" >&6; }
10764else
10765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
10767fi
10768
10769
10770  test -n "$SH" && break
10771done
10772
10773    else
10774      # If it succeeded, then it was overridden by the user. We will use it
10775      # for the tool.
10776
10777      # First remove it from the list of overridden variables, so we can test
10778      # for unknown variables in the end.
10779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10780
10781      # Check if we try to supply an empty value
10782      if test "x$SH" = x; then
10783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10784$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10786$as_echo_n "checking for SH... " >&6; }
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10788$as_echo "disabled" >&6; }
10789      else
10790        # Check if the provided tool contains a complete path.
10791        tool_specified="$SH"
10792        tool_basename="${tool_specified##*/}"
10793        if test "x$tool_basename" = "x$tool_specified"; then
10794          # A command without a complete path is provided, search $PATH.
10795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10796$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10797          # Extract the first word of "$tool_basename", so it can be a program name with args.
10798set dummy $tool_basename; ac_word=$2
10799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10800$as_echo_n "checking for $ac_word... " >&6; }
10801if ${ac_cv_path_SH+:} false; then :
10802  $as_echo_n "(cached) " >&6
10803else
10804  case $SH in
10805  [\\/]* | ?:[\\/]*)
10806  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10807  ;;
10808  *)
10809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10810for as_dir in $PATH
10811do
10812  IFS=$as_save_IFS
10813  test -z "$as_dir" && as_dir=.
10814    for ac_exec_ext in '' $ac_executable_extensions; do
10815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10816    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10818    break 2
10819  fi
10820done
10821  done
10822IFS=$as_save_IFS
10823
10824  ;;
10825esac
10826fi
10827SH=$ac_cv_path_SH
10828if test -n "$SH"; then
10829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10830$as_echo "$SH" >&6; }
10831else
10832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10833$as_echo "no" >&6; }
10834fi
10835
10836
10837          if test "x$SH" = x; then
10838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10839          fi
10840        else
10841          # Otherwise we believe it is a complete path. Use it as it is.
10842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10843$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10845$as_echo_n "checking for SH... " >&6; }
10846          if test ! -x "$tool_specified"; then
10847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10848$as_echo "not found" >&6; }
10849            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10850          fi
10851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10852$as_echo "$tool_specified" >&6; }
10853        fi
10854      fi
10855    fi
10856
10857  fi
10858
10859
10860
10861  if test "x$SH" = x; then
10862    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10863  fi
10864
10865
10866
10867
10868
10869  # Publish this variable in the help.
10870
10871
10872  if [ -z "${SORT+x}" ]; then
10873    # The variable is not set by user, try to locate tool using the code snippet
10874    for ac_prog in sort
10875do
10876  # Extract the first word of "$ac_prog", so it can be a program name with args.
10877set dummy $ac_prog; ac_word=$2
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10879$as_echo_n "checking for $ac_word... " >&6; }
10880if ${ac_cv_path_SORT+:} false; then :
10881  $as_echo_n "(cached) " >&6
10882else
10883  case $SORT in
10884  [\\/]* | ?:[\\/]*)
10885  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10886  ;;
10887  *)
10888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10889for as_dir in $PATH
10890do
10891  IFS=$as_save_IFS
10892  test -z "$as_dir" && as_dir=.
10893    for ac_exec_ext in '' $ac_executable_extensions; do
10894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10895    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10897    break 2
10898  fi
10899done
10900  done
10901IFS=$as_save_IFS
10902
10903  ;;
10904esac
10905fi
10906SORT=$ac_cv_path_SORT
10907if test -n "$SORT"; then
10908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10909$as_echo "$SORT" >&6; }
10910else
10911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
10913fi
10914
10915
10916  test -n "$SORT" && break
10917done
10918
10919  else
10920    # The variable is set, but is it from the command line or the environment?
10921
10922    # Try to remove the string !SORT! from our list.
10923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10925      # If it failed, the variable was not from the command line. Ignore it,
10926      # but warn the user (except for BASH, which is always set by the calling BASH).
10927      if test "xSORT" != xBASH; then
10928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10929$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10930      fi
10931      # Try to locate tool using the code snippet
10932      for ac_prog in sort
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_SORT+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $SORT in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964SORT=$ac_cv_path_SORT
10965if test -n "$SORT"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10967$as_echo "$SORT" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$SORT" && break
10975done
10976
10977    else
10978      # If it succeeded, then it was overridden by the user. We will use it
10979      # for the tool.
10980
10981      # First remove it from the list of overridden variables, so we can test
10982      # for unknown variables in the end.
10983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10984
10985      # Check if we try to supply an empty value
10986      if test "x$SORT" = x; then
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10988$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10990$as_echo_n "checking for SORT... " >&6; }
10991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10992$as_echo "disabled" >&6; }
10993      else
10994        # Check if the provided tool contains a complete path.
10995        tool_specified="$SORT"
10996        tool_basename="${tool_specified##*/}"
10997        if test "x$tool_basename" = "x$tool_specified"; then
10998          # A command without a complete path is provided, search $PATH.
10999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11000$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11001          # Extract the first word of "$tool_basename", so it can be a program name with args.
11002set dummy $tool_basename; ac_word=$2
11003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
11005if ${ac_cv_path_SORT+:} false; then :
11006  $as_echo_n "(cached) " >&6
11007else
11008  case $SORT in
11009  [\\/]* | ?:[\\/]*)
11010  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11011  ;;
11012  *)
11013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11014for as_dir in $PATH
11015do
11016  IFS=$as_save_IFS
11017  test -z "$as_dir" && as_dir=.
11018    for ac_exec_ext in '' $ac_executable_extensions; do
11019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11020    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11022    break 2
11023  fi
11024done
11025  done
11026IFS=$as_save_IFS
11027
11028  ;;
11029esac
11030fi
11031SORT=$ac_cv_path_SORT
11032if test -n "$SORT"; then
11033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11034$as_echo "$SORT" >&6; }
11035else
11036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11037$as_echo "no" >&6; }
11038fi
11039
11040
11041          if test "x$SORT" = x; then
11042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11043          fi
11044        else
11045          # Otherwise we believe it is a complete path. Use it as it is.
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11047$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11049$as_echo_n "checking for SORT... " >&6; }
11050          if test ! -x "$tool_specified"; then
11051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11052$as_echo "not found" >&6; }
11053            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11054          fi
11055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11056$as_echo "$tool_specified" >&6; }
11057        fi
11058      fi
11059    fi
11060
11061  fi
11062
11063
11064
11065  if test "x$SORT" = x; then
11066    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11067  fi
11068
11069
11070
11071
11072
11073  # Publish this variable in the help.
11074
11075
11076  if [ -z "${TAIL+x}" ]; then
11077    # The variable is not set by user, try to locate tool using the code snippet
11078    for ac_prog in tail
11079do
11080  # Extract the first word of "$ac_prog", so it can be a program name with args.
11081set dummy $ac_prog; ac_word=$2
11082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11083$as_echo_n "checking for $ac_word... " >&6; }
11084if ${ac_cv_path_TAIL+:} false; then :
11085  $as_echo_n "(cached) " >&6
11086else
11087  case $TAIL in
11088  [\\/]* | ?:[\\/]*)
11089  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11090  ;;
11091  *)
11092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11093for as_dir in $PATH
11094do
11095  IFS=$as_save_IFS
11096  test -z "$as_dir" && as_dir=.
11097    for ac_exec_ext in '' $ac_executable_extensions; do
11098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11099    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11101    break 2
11102  fi
11103done
11104  done
11105IFS=$as_save_IFS
11106
11107  ;;
11108esac
11109fi
11110TAIL=$ac_cv_path_TAIL
11111if test -n "$TAIL"; then
11112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11113$as_echo "$TAIL" >&6; }
11114else
11115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116$as_echo "no" >&6; }
11117fi
11118
11119
11120  test -n "$TAIL" && break
11121done
11122
11123  else
11124    # The variable is set, but is it from the command line or the environment?
11125
11126    # Try to remove the string !TAIL! from our list.
11127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11129      # If it failed, the variable was not from the command line. Ignore it,
11130      # but warn the user (except for BASH, which is always set by the calling BASH).
11131      if test "xTAIL" != xBASH; then
11132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11133$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11134      fi
11135      # Try to locate tool using the code snippet
11136      for ac_prog in tail
11137do
11138  # Extract the first word of "$ac_prog", so it can be a program name with args.
11139set dummy $ac_prog; ac_word=$2
11140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11141$as_echo_n "checking for $ac_word... " >&6; }
11142if ${ac_cv_path_TAIL+:} false; then :
11143  $as_echo_n "(cached) " >&6
11144else
11145  case $TAIL in
11146  [\\/]* | ?:[\\/]*)
11147  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11148  ;;
11149  *)
11150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11151for as_dir in $PATH
11152do
11153  IFS=$as_save_IFS
11154  test -z "$as_dir" && as_dir=.
11155    for ac_exec_ext in '' $ac_executable_extensions; do
11156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11157    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11159    break 2
11160  fi
11161done
11162  done
11163IFS=$as_save_IFS
11164
11165  ;;
11166esac
11167fi
11168TAIL=$ac_cv_path_TAIL
11169if test -n "$TAIL"; then
11170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11171$as_echo "$TAIL" >&6; }
11172else
11173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175fi
11176
11177
11178  test -n "$TAIL" && break
11179done
11180
11181    else
11182      # If it succeeded, then it was overridden by the user. We will use it
11183      # for the tool.
11184
11185      # First remove it from the list of overridden variables, so we can test
11186      # for unknown variables in the end.
11187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11188
11189      # Check if we try to supply an empty value
11190      if test "x$TAIL" = x; then
11191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11192$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11194$as_echo_n "checking for TAIL... " >&6; }
11195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11196$as_echo "disabled" >&6; }
11197      else
11198        # Check if the provided tool contains a complete path.
11199        tool_specified="$TAIL"
11200        tool_basename="${tool_specified##*/}"
11201        if test "x$tool_basename" = "x$tool_specified"; then
11202          # A command without a complete path is provided, search $PATH.
11203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11204$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11205          # Extract the first word of "$tool_basename", so it can be a program name with args.
11206set dummy $tool_basename; ac_word=$2
11207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11208$as_echo_n "checking for $ac_word... " >&6; }
11209if ${ac_cv_path_TAIL+:} false; then :
11210  $as_echo_n "(cached) " >&6
11211else
11212  case $TAIL in
11213  [\\/]* | ?:[\\/]*)
11214  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11215  ;;
11216  *)
11217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11218for as_dir in $PATH
11219do
11220  IFS=$as_save_IFS
11221  test -z "$as_dir" && as_dir=.
11222    for ac_exec_ext in '' $ac_executable_extensions; do
11223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11224    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11226    break 2
11227  fi
11228done
11229  done
11230IFS=$as_save_IFS
11231
11232  ;;
11233esac
11234fi
11235TAIL=$ac_cv_path_TAIL
11236if test -n "$TAIL"; then
11237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11238$as_echo "$TAIL" >&6; }
11239else
11240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
11242fi
11243
11244
11245          if test "x$TAIL" = x; then
11246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11247          fi
11248        else
11249          # Otherwise we believe it is a complete path. Use it as it is.
11250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11251$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11253$as_echo_n "checking for TAIL... " >&6; }
11254          if test ! -x "$tool_specified"; then
11255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11256$as_echo "not found" >&6; }
11257            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11258          fi
11259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11260$as_echo "$tool_specified" >&6; }
11261        fi
11262      fi
11263    fi
11264
11265  fi
11266
11267
11268
11269  if test "x$TAIL" = x; then
11270    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11271  fi
11272
11273
11274
11275
11276
11277  # Publish this variable in the help.
11278
11279
11280  if [ -z "${TAR+x}" ]; then
11281    # The variable is not set by user, try to locate tool using the code snippet
11282    for ac_prog in gtar tar
11283do
11284  # Extract the first word of "$ac_prog", so it can be a program name with args.
11285set dummy $ac_prog; ac_word=$2
11286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11287$as_echo_n "checking for $ac_word... " >&6; }
11288if ${ac_cv_path_TAR+:} false; then :
11289  $as_echo_n "(cached) " >&6
11290else
11291  case $TAR in
11292  [\\/]* | ?:[\\/]*)
11293  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11294  ;;
11295  *)
11296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11297for as_dir in $PATH
11298do
11299  IFS=$as_save_IFS
11300  test -z "$as_dir" && as_dir=.
11301    for ac_exec_ext in '' $ac_executable_extensions; do
11302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11303    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11305    break 2
11306  fi
11307done
11308  done
11309IFS=$as_save_IFS
11310
11311  ;;
11312esac
11313fi
11314TAR=$ac_cv_path_TAR
11315if test -n "$TAR"; then
11316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11317$as_echo "$TAR" >&6; }
11318else
11319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
11321fi
11322
11323
11324  test -n "$TAR" && break
11325done
11326
11327  else
11328    # The variable is set, but is it from the command line or the environment?
11329
11330    # Try to remove the string !TAR! from our list.
11331    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11332    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11333      # If it failed, the variable was not from the command line. Ignore it,
11334      # but warn the user (except for BASH, which is always set by the calling BASH).
11335      if test "xTAR" != xBASH; then
11336        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11337$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11338      fi
11339      # Try to locate tool using the code snippet
11340      for ac_prog in gtar tar
11341do
11342  # Extract the first word of "$ac_prog", so it can be a program name with args.
11343set dummy $ac_prog; ac_word=$2
11344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11345$as_echo_n "checking for $ac_word... " >&6; }
11346if ${ac_cv_path_TAR+:} false; then :
11347  $as_echo_n "(cached) " >&6
11348else
11349  case $TAR in
11350  [\\/]* | ?:[\\/]*)
11351  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11352  ;;
11353  *)
11354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11355for as_dir in $PATH
11356do
11357  IFS=$as_save_IFS
11358  test -z "$as_dir" && as_dir=.
11359    for ac_exec_ext in '' $ac_executable_extensions; do
11360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11361    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11363    break 2
11364  fi
11365done
11366  done
11367IFS=$as_save_IFS
11368
11369  ;;
11370esac
11371fi
11372TAR=$ac_cv_path_TAR
11373if test -n "$TAR"; then
11374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11375$as_echo "$TAR" >&6; }
11376else
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379fi
11380
11381
11382  test -n "$TAR" && break
11383done
11384
11385    else
11386      # If it succeeded, then it was overridden by the user. We will use it
11387      # for the tool.
11388
11389      # First remove it from the list of overridden variables, so we can test
11390      # for unknown variables in the end.
11391      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11392
11393      # Check if we try to supply an empty value
11394      if test "x$TAR" = x; then
11395        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11396$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11397        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11398$as_echo_n "checking for TAR... " >&6; }
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11400$as_echo "disabled" >&6; }
11401      else
11402        # Check if the provided tool contains a complete path.
11403        tool_specified="$TAR"
11404        tool_basename="${tool_specified##*/}"
11405        if test "x$tool_basename" = "x$tool_specified"; then
11406          # A command without a complete path is provided, search $PATH.
11407          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11408$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11409          # Extract the first word of "$tool_basename", so it can be a program name with args.
11410set dummy $tool_basename; ac_word=$2
11411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412$as_echo_n "checking for $ac_word... " >&6; }
11413if ${ac_cv_path_TAR+:} false; then :
11414  $as_echo_n "(cached) " >&6
11415else
11416  case $TAR in
11417  [\\/]* | ?:[\\/]*)
11418  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11419  ;;
11420  *)
11421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11422for as_dir in $PATH
11423do
11424  IFS=$as_save_IFS
11425  test -z "$as_dir" && as_dir=.
11426    for ac_exec_ext in '' $ac_executable_extensions; do
11427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11428    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11430    break 2
11431  fi
11432done
11433  done
11434IFS=$as_save_IFS
11435
11436  ;;
11437esac
11438fi
11439TAR=$ac_cv_path_TAR
11440if test -n "$TAR"; then
11441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11442$as_echo "$TAR" >&6; }
11443else
11444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11445$as_echo "no" >&6; }
11446fi
11447
11448
11449          if test "x$TAR" = x; then
11450            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11451          fi
11452        else
11453          # Otherwise we believe it is a complete path. Use it as it is.
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11455$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11457$as_echo_n "checking for TAR... " >&6; }
11458          if test ! -x "$tool_specified"; then
11459            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11460$as_echo "not found" >&6; }
11461            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11462          fi
11463          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11464$as_echo "$tool_specified" >&6; }
11465        fi
11466      fi
11467    fi
11468
11469  fi
11470
11471
11472
11473  if test "x$TAR" = x; then
11474    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11475  fi
11476
11477
11478
11479
11480
11481  # Publish this variable in the help.
11482
11483
11484  if [ -z "${TEE+x}" ]; then
11485    # The variable is not set by user, try to locate tool using the code snippet
11486    for ac_prog in tee
11487do
11488  # Extract the first word of "$ac_prog", so it can be a program name with args.
11489set dummy $ac_prog; ac_word=$2
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491$as_echo_n "checking for $ac_word... " >&6; }
11492if ${ac_cv_path_TEE+:} false; then :
11493  $as_echo_n "(cached) " >&6
11494else
11495  case $TEE in
11496  [\\/]* | ?:[\\/]*)
11497  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11498  ;;
11499  *)
11500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11501for as_dir in $PATH
11502do
11503  IFS=$as_save_IFS
11504  test -z "$as_dir" && as_dir=.
11505    for ac_exec_ext in '' $ac_executable_extensions; do
11506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11507    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11509    break 2
11510  fi
11511done
11512  done
11513IFS=$as_save_IFS
11514
11515  ;;
11516esac
11517fi
11518TEE=$ac_cv_path_TEE
11519if test -n "$TEE"; then
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11521$as_echo "$TEE" >&6; }
11522else
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
11525fi
11526
11527
11528  test -n "$TEE" && break
11529done
11530
11531  else
11532    # The variable is set, but is it from the command line or the environment?
11533
11534    # Try to remove the string !TEE! from our list.
11535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11537      # If it failed, the variable was not from the command line. Ignore it,
11538      # but warn the user (except for BASH, which is always set by the calling BASH).
11539      if test "xTEE" != xBASH; then
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11541$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11542      fi
11543      # Try to locate tool using the code snippet
11544      for ac_prog in tee
11545do
11546  # Extract the first word of "$ac_prog", so it can be a program name with args.
11547set dummy $ac_prog; ac_word=$2
11548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11549$as_echo_n "checking for $ac_word... " >&6; }
11550if ${ac_cv_path_TEE+:} false; then :
11551  $as_echo_n "(cached) " >&6
11552else
11553  case $TEE in
11554  [\\/]* | ?:[\\/]*)
11555  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11556  ;;
11557  *)
11558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11559for as_dir in $PATH
11560do
11561  IFS=$as_save_IFS
11562  test -z "$as_dir" && as_dir=.
11563    for ac_exec_ext in '' $ac_executable_extensions; do
11564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11565    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11567    break 2
11568  fi
11569done
11570  done
11571IFS=$as_save_IFS
11572
11573  ;;
11574esac
11575fi
11576TEE=$ac_cv_path_TEE
11577if test -n "$TEE"; then
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11579$as_echo "$TEE" >&6; }
11580else
11581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11582$as_echo "no" >&6; }
11583fi
11584
11585
11586  test -n "$TEE" && break
11587done
11588
11589    else
11590      # If it succeeded, then it was overridden by the user. We will use it
11591      # for the tool.
11592
11593      # First remove it from the list of overridden variables, so we can test
11594      # for unknown variables in the end.
11595      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11596
11597      # Check if we try to supply an empty value
11598      if test "x$TEE" = x; then
11599        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11600$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11601        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11602$as_echo_n "checking for TEE... " >&6; }
11603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11604$as_echo "disabled" >&6; }
11605      else
11606        # Check if the provided tool contains a complete path.
11607        tool_specified="$TEE"
11608        tool_basename="${tool_specified##*/}"
11609        if test "x$tool_basename" = "x$tool_specified"; then
11610          # A command without a complete path is provided, search $PATH.
11611          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11612$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11613          # Extract the first word of "$tool_basename", so it can be a program name with args.
11614set dummy $tool_basename; ac_word=$2
11615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11616$as_echo_n "checking for $ac_word... " >&6; }
11617if ${ac_cv_path_TEE+:} false; then :
11618  $as_echo_n "(cached) " >&6
11619else
11620  case $TEE in
11621  [\\/]* | ?:[\\/]*)
11622  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11623  ;;
11624  *)
11625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11626for as_dir in $PATH
11627do
11628  IFS=$as_save_IFS
11629  test -z "$as_dir" && as_dir=.
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11632    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11634    break 2
11635  fi
11636done
11637  done
11638IFS=$as_save_IFS
11639
11640  ;;
11641esac
11642fi
11643TEE=$ac_cv_path_TEE
11644if test -n "$TEE"; then
11645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11646$as_echo "$TEE" >&6; }
11647else
11648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
11650fi
11651
11652
11653          if test "x$TEE" = x; then
11654            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11655          fi
11656        else
11657          # Otherwise we believe it is a complete path. Use it as it is.
11658          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11659$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11660          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11661$as_echo_n "checking for TEE... " >&6; }
11662          if test ! -x "$tool_specified"; then
11663            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11664$as_echo "not found" >&6; }
11665            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11666          fi
11667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11668$as_echo "$tool_specified" >&6; }
11669        fi
11670      fi
11671    fi
11672
11673  fi
11674
11675
11676
11677  if test "x$TEE" = x; then
11678    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11679  fi
11680
11681
11682
11683
11684
11685  # Publish this variable in the help.
11686
11687
11688  if [ -z "${TOUCH+x}" ]; then
11689    # The variable is not set by user, try to locate tool using the code snippet
11690    for ac_prog in touch
11691do
11692  # Extract the first word of "$ac_prog", so it can be a program name with args.
11693set dummy $ac_prog; ac_word=$2
11694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11695$as_echo_n "checking for $ac_word... " >&6; }
11696if ${ac_cv_path_TOUCH+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  case $TOUCH in
11700  [\\/]* | ?:[\\/]*)
11701  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11702  ;;
11703  *)
11704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11705for as_dir in $PATH
11706do
11707  IFS=$as_save_IFS
11708  test -z "$as_dir" && as_dir=.
11709    for ac_exec_ext in '' $ac_executable_extensions; do
11710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11711    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11713    break 2
11714  fi
11715done
11716  done
11717IFS=$as_save_IFS
11718
11719  ;;
11720esac
11721fi
11722TOUCH=$ac_cv_path_TOUCH
11723if test -n "$TOUCH"; then
11724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11725$as_echo "$TOUCH" >&6; }
11726else
11727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11728$as_echo "no" >&6; }
11729fi
11730
11731
11732  test -n "$TOUCH" && break
11733done
11734
11735  else
11736    # The variable is set, but is it from the command line or the environment?
11737
11738    # Try to remove the string !TOUCH! from our list.
11739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11741      # If it failed, the variable was not from the command line. Ignore it,
11742      # but warn the user (except for BASH, which is always set by the calling BASH).
11743      if test "xTOUCH" != xBASH; then
11744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11745$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11746      fi
11747      # Try to locate tool using the code snippet
11748      for ac_prog in touch
11749do
11750  # Extract the first word of "$ac_prog", so it can be a program name with args.
11751set dummy $ac_prog; ac_word=$2
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11753$as_echo_n "checking for $ac_word... " >&6; }
11754if ${ac_cv_path_TOUCH+:} false; then :
11755  $as_echo_n "(cached) " >&6
11756else
11757  case $TOUCH in
11758  [\\/]* | ?:[\\/]*)
11759  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11760  ;;
11761  *)
11762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11763for as_dir in $PATH
11764do
11765  IFS=$as_save_IFS
11766  test -z "$as_dir" && as_dir=.
11767    for ac_exec_ext in '' $ac_executable_extensions; do
11768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11769    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11771    break 2
11772  fi
11773done
11774  done
11775IFS=$as_save_IFS
11776
11777  ;;
11778esac
11779fi
11780TOUCH=$ac_cv_path_TOUCH
11781if test -n "$TOUCH"; then
11782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11783$as_echo "$TOUCH" >&6; }
11784else
11785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11786$as_echo "no" >&6; }
11787fi
11788
11789
11790  test -n "$TOUCH" && break
11791done
11792
11793    else
11794      # If it succeeded, then it was overridden by the user. We will use it
11795      # for the tool.
11796
11797      # First remove it from the list of overridden variables, so we can test
11798      # for unknown variables in the end.
11799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11800
11801      # Check if we try to supply an empty value
11802      if test "x$TOUCH" = x; then
11803        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11804$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11806$as_echo_n "checking for TOUCH... " >&6; }
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11808$as_echo "disabled" >&6; }
11809      else
11810        # Check if the provided tool contains a complete path.
11811        tool_specified="$TOUCH"
11812        tool_basename="${tool_specified##*/}"
11813        if test "x$tool_basename" = "x$tool_specified"; then
11814          # A command without a complete path is provided, search $PATH.
11815          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11816$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11817          # Extract the first word of "$tool_basename", so it can be a program name with args.
11818set dummy $tool_basename; ac_word=$2
11819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11820$as_echo_n "checking for $ac_word... " >&6; }
11821if ${ac_cv_path_TOUCH+:} false; then :
11822  $as_echo_n "(cached) " >&6
11823else
11824  case $TOUCH in
11825  [\\/]* | ?:[\\/]*)
11826  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11827  ;;
11828  *)
11829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11830for as_dir in $PATH
11831do
11832  IFS=$as_save_IFS
11833  test -z "$as_dir" && as_dir=.
11834    for ac_exec_ext in '' $ac_executable_extensions; do
11835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11836    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11838    break 2
11839  fi
11840done
11841  done
11842IFS=$as_save_IFS
11843
11844  ;;
11845esac
11846fi
11847TOUCH=$ac_cv_path_TOUCH
11848if test -n "$TOUCH"; then
11849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11850$as_echo "$TOUCH" >&6; }
11851else
11852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11853$as_echo "no" >&6; }
11854fi
11855
11856
11857          if test "x$TOUCH" = x; then
11858            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11859          fi
11860        else
11861          # Otherwise we believe it is a complete path. Use it as it is.
11862          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11863$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11864          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11865$as_echo_n "checking for TOUCH... " >&6; }
11866          if test ! -x "$tool_specified"; then
11867            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11868$as_echo "not found" >&6; }
11869            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11870          fi
11871          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11872$as_echo "$tool_specified" >&6; }
11873        fi
11874      fi
11875    fi
11876
11877  fi
11878
11879
11880
11881  if test "x$TOUCH" = x; then
11882    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11883  fi
11884
11885
11886
11887
11888
11889  # Publish this variable in the help.
11890
11891
11892  if [ -z "${TR+x}" ]; then
11893    # The variable is not set by user, try to locate tool using the code snippet
11894    for ac_prog in tr
11895do
11896  # Extract the first word of "$ac_prog", so it can be a program name with args.
11897set dummy $ac_prog; ac_word=$2
11898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899$as_echo_n "checking for $ac_word... " >&6; }
11900if ${ac_cv_path_TR+:} false; then :
11901  $as_echo_n "(cached) " >&6
11902else
11903  case $TR in
11904  [\\/]* | ?:[\\/]*)
11905  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11906  ;;
11907  *)
11908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11909for as_dir in $PATH
11910do
11911  IFS=$as_save_IFS
11912  test -z "$as_dir" && as_dir=.
11913    for ac_exec_ext in '' $ac_executable_extensions; do
11914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11915    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11917    break 2
11918  fi
11919done
11920  done
11921IFS=$as_save_IFS
11922
11923  ;;
11924esac
11925fi
11926TR=$ac_cv_path_TR
11927if test -n "$TR"; then
11928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11929$as_echo "$TR" >&6; }
11930else
11931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
11933fi
11934
11935
11936  test -n "$TR" && break
11937done
11938
11939  else
11940    # The variable is set, but is it from the command line or the environment?
11941
11942    # Try to remove the string !TR! from our list.
11943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11945      # If it failed, the variable was not from the command line. Ignore it,
11946      # but warn the user (except for BASH, which is always set by the calling BASH).
11947      if test "xTR" != xBASH; then
11948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11949$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11950      fi
11951      # Try to locate tool using the code snippet
11952      for ac_prog in tr
11953do
11954  # Extract the first word of "$ac_prog", so it can be a program name with args.
11955set dummy $ac_prog; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_TR+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $TR in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984TR=$ac_cv_path_TR
11985if test -n "$TR"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11987$as_echo "$TR" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994  test -n "$TR" && break
11995done
11996
11997    else
11998      # If it succeeded, then it was overridden by the user. We will use it
11999      # for the tool.
12000
12001      # First remove it from the list of overridden variables, so we can test
12002      # for unknown variables in the end.
12003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12004
12005      # Check if we try to supply an empty value
12006      if test "x$TR" = x; then
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12008$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12010$as_echo_n "checking for TR... " >&6; }
12011        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12012$as_echo "disabled" >&6; }
12013      else
12014        # Check if the provided tool contains a complete path.
12015        tool_specified="$TR"
12016        tool_basename="${tool_specified##*/}"
12017        if test "x$tool_basename" = "x$tool_specified"; then
12018          # A command without a complete path is provided, search $PATH.
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12020$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12021          # Extract the first word of "$tool_basename", so it can be a program name with args.
12022set dummy $tool_basename; ac_word=$2
12023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12024$as_echo_n "checking for $ac_word... " >&6; }
12025if ${ac_cv_path_TR+:} false; then :
12026  $as_echo_n "(cached) " >&6
12027else
12028  case $TR in
12029  [\\/]* | ?:[\\/]*)
12030  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12031  ;;
12032  *)
12033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12034for as_dir in $PATH
12035do
12036  IFS=$as_save_IFS
12037  test -z "$as_dir" && as_dir=.
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12040    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12042    break 2
12043  fi
12044done
12045  done
12046IFS=$as_save_IFS
12047
12048  ;;
12049esac
12050fi
12051TR=$ac_cv_path_TR
12052if test -n "$TR"; then
12053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12054$as_echo "$TR" >&6; }
12055else
12056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12057$as_echo "no" >&6; }
12058fi
12059
12060
12061          if test "x$TR" = x; then
12062            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12063          fi
12064        else
12065          # Otherwise we believe it is a complete path. Use it as it is.
12066          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12067$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12068          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12069$as_echo_n "checking for TR... " >&6; }
12070          if test ! -x "$tool_specified"; then
12071            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12072$as_echo "not found" >&6; }
12073            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12074          fi
12075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12076$as_echo "$tool_specified" >&6; }
12077        fi
12078      fi
12079    fi
12080
12081  fi
12082
12083
12084
12085  if test "x$TR" = x; then
12086    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12087  fi
12088
12089
12090
12091
12092
12093  # Publish this variable in the help.
12094
12095
12096  if [ -z "${UNAME+x}" ]; then
12097    # The variable is not set by user, try to locate tool using the code snippet
12098    for ac_prog in uname
12099do
12100  # Extract the first word of "$ac_prog", so it can be a program name with args.
12101set dummy $ac_prog; ac_word=$2
12102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12103$as_echo_n "checking for $ac_word... " >&6; }
12104if ${ac_cv_path_UNAME+:} false; then :
12105  $as_echo_n "(cached) " >&6
12106else
12107  case $UNAME in
12108  [\\/]* | ?:[\\/]*)
12109  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12110  ;;
12111  *)
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12119    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12121    break 2
12122  fi
12123done
12124  done
12125IFS=$as_save_IFS
12126
12127  ;;
12128esac
12129fi
12130UNAME=$ac_cv_path_UNAME
12131if test -n "$UNAME"; then
12132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12133$as_echo "$UNAME" >&6; }
12134else
12135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12136$as_echo "no" >&6; }
12137fi
12138
12139
12140  test -n "$UNAME" && break
12141done
12142
12143  else
12144    # The variable is set, but is it from the command line or the environment?
12145
12146    # Try to remove the string !UNAME! from our list.
12147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12149      # If it failed, the variable was not from the command line. Ignore it,
12150      # but warn the user (except for BASH, which is always set by the calling BASH).
12151      if test "xUNAME" != xBASH; then
12152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12153$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12154      fi
12155      # Try to locate tool using the code snippet
12156      for ac_prog in uname
12157do
12158  # Extract the first word of "$ac_prog", so it can be a program name with args.
12159set dummy $ac_prog; ac_word=$2
12160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12161$as_echo_n "checking for $ac_word... " >&6; }
12162if ${ac_cv_path_UNAME+:} false; then :
12163  $as_echo_n "(cached) " >&6
12164else
12165  case $UNAME in
12166  [\\/]* | ?:[\\/]*)
12167  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12168  ;;
12169  *)
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12177    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12179    break 2
12180  fi
12181done
12182  done
12183IFS=$as_save_IFS
12184
12185  ;;
12186esac
12187fi
12188UNAME=$ac_cv_path_UNAME
12189if test -n "$UNAME"; then
12190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12191$as_echo "$UNAME" >&6; }
12192else
12193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12194$as_echo "no" >&6; }
12195fi
12196
12197
12198  test -n "$UNAME" && break
12199done
12200
12201    else
12202      # If it succeeded, then it was overridden by the user. We will use it
12203      # for the tool.
12204
12205      # First remove it from the list of overridden variables, so we can test
12206      # for unknown variables in the end.
12207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12208
12209      # Check if we try to supply an empty value
12210      if test "x$UNAME" = x; then
12211        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12212$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12213        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12214$as_echo_n "checking for UNAME... " >&6; }
12215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12216$as_echo "disabled" >&6; }
12217      else
12218        # Check if the provided tool contains a complete path.
12219        tool_specified="$UNAME"
12220        tool_basename="${tool_specified##*/}"
12221        if test "x$tool_basename" = "x$tool_specified"; then
12222          # A command without a complete path is provided, search $PATH.
12223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12224$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12225          # Extract the first word of "$tool_basename", so it can be a program name with args.
12226set dummy $tool_basename; ac_word=$2
12227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12228$as_echo_n "checking for $ac_word... " >&6; }
12229if ${ac_cv_path_UNAME+:} false; then :
12230  $as_echo_n "(cached) " >&6
12231else
12232  case $UNAME in
12233  [\\/]* | ?:[\\/]*)
12234  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12235  ;;
12236  *)
12237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12238for as_dir in $PATH
12239do
12240  IFS=$as_save_IFS
12241  test -z "$as_dir" && as_dir=.
12242    for ac_exec_ext in '' $ac_executable_extensions; do
12243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12244    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12246    break 2
12247  fi
12248done
12249  done
12250IFS=$as_save_IFS
12251
12252  ;;
12253esac
12254fi
12255UNAME=$ac_cv_path_UNAME
12256if test -n "$UNAME"; then
12257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12258$as_echo "$UNAME" >&6; }
12259else
12260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12261$as_echo "no" >&6; }
12262fi
12263
12264
12265          if test "x$UNAME" = x; then
12266            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12267          fi
12268        else
12269          # Otherwise we believe it is a complete path. Use it as it is.
12270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12271$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12272          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12273$as_echo_n "checking for UNAME... " >&6; }
12274          if test ! -x "$tool_specified"; then
12275            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12276$as_echo "not found" >&6; }
12277            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12278          fi
12279          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12280$as_echo "$tool_specified" >&6; }
12281        fi
12282      fi
12283    fi
12284
12285  fi
12286
12287
12288
12289  if test "x$UNAME" = x; then
12290    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12291  fi
12292
12293
12294
12295
12296
12297  # Publish this variable in the help.
12298
12299
12300  if [ -z "${UNIQ+x}" ]; then
12301    # The variable is not set by user, try to locate tool using the code snippet
12302    for ac_prog in uniq
12303do
12304  # Extract the first word of "$ac_prog", so it can be a program name with args.
12305set dummy $ac_prog; ac_word=$2
12306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12307$as_echo_n "checking for $ac_word... " >&6; }
12308if ${ac_cv_path_UNIQ+:} false; then :
12309  $as_echo_n "(cached) " >&6
12310else
12311  case $UNIQ in
12312  [\\/]* | ?:[\\/]*)
12313  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12314  ;;
12315  *)
12316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12317for as_dir in $PATH
12318do
12319  IFS=$as_save_IFS
12320  test -z "$as_dir" && as_dir=.
12321    for ac_exec_ext in '' $ac_executable_extensions; do
12322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12323    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12325    break 2
12326  fi
12327done
12328  done
12329IFS=$as_save_IFS
12330
12331  ;;
12332esac
12333fi
12334UNIQ=$ac_cv_path_UNIQ
12335if test -n "$UNIQ"; then
12336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12337$as_echo "$UNIQ" >&6; }
12338else
12339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12340$as_echo "no" >&6; }
12341fi
12342
12343
12344  test -n "$UNIQ" && break
12345done
12346
12347  else
12348    # The variable is set, but is it from the command line or the environment?
12349
12350    # Try to remove the string !UNIQ! from our list.
12351    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12352    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12353      # If it failed, the variable was not from the command line. Ignore it,
12354      # but warn the user (except for BASH, which is always set by the calling BASH).
12355      if test "xUNIQ" != xBASH; then
12356        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12357$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12358      fi
12359      # Try to locate tool using the code snippet
12360      for ac_prog in uniq
12361do
12362  # Extract the first word of "$ac_prog", so it can be a program name with args.
12363set dummy $ac_prog; ac_word=$2
12364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12365$as_echo_n "checking for $ac_word... " >&6; }
12366if ${ac_cv_path_UNIQ+:} false; then :
12367  $as_echo_n "(cached) " >&6
12368else
12369  case $UNIQ in
12370  [\\/]* | ?:[\\/]*)
12371  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12372  ;;
12373  *)
12374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12375for as_dir in $PATH
12376do
12377  IFS=$as_save_IFS
12378  test -z "$as_dir" && as_dir=.
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12381    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12383    break 2
12384  fi
12385done
12386  done
12387IFS=$as_save_IFS
12388
12389  ;;
12390esac
12391fi
12392UNIQ=$ac_cv_path_UNIQ
12393if test -n "$UNIQ"; then
12394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12395$as_echo "$UNIQ" >&6; }
12396else
12397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12398$as_echo "no" >&6; }
12399fi
12400
12401
12402  test -n "$UNIQ" && break
12403done
12404
12405    else
12406      # If it succeeded, then it was overridden by the user. We will use it
12407      # for the tool.
12408
12409      # First remove it from the list of overridden variables, so we can test
12410      # for unknown variables in the end.
12411      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12412
12413      # Check if we try to supply an empty value
12414      if test "x$UNIQ" = x; then
12415        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12416$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12417        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12418$as_echo_n "checking for UNIQ... " >&6; }
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12420$as_echo "disabled" >&6; }
12421      else
12422        # Check if the provided tool contains a complete path.
12423        tool_specified="$UNIQ"
12424        tool_basename="${tool_specified##*/}"
12425        if test "x$tool_basename" = "x$tool_specified"; then
12426          # A command without a complete path is provided, search $PATH.
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12428$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12429          # Extract the first word of "$tool_basename", so it can be a program name with args.
12430set dummy $tool_basename; ac_word=$2
12431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12432$as_echo_n "checking for $ac_word... " >&6; }
12433if ${ac_cv_path_UNIQ+:} false; then :
12434  $as_echo_n "(cached) " >&6
12435else
12436  case $UNIQ in
12437  [\\/]* | ?:[\\/]*)
12438  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12439  ;;
12440  *)
12441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12442for as_dir in $PATH
12443do
12444  IFS=$as_save_IFS
12445  test -z "$as_dir" && as_dir=.
12446    for ac_exec_ext in '' $ac_executable_extensions; do
12447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12448    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12450    break 2
12451  fi
12452done
12453  done
12454IFS=$as_save_IFS
12455
12456  ;;
12457esac
12458fi
12459UNIQ=$ac_cv_path_UNIQ
12460if test -n "$UNIQ"; then
12461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12462$as_echo "$UNIQ" >&6; }
12463else
12464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12465$as_echo "no" >&6; }
12466fi
12467
12468
12469          if test "x$UNIQ" = x; then
12470            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12471          fi
12472        else
12473          # Otherwise we believe it is a complete path. Use it as it is.
12474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12475$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12476          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12477$as_echo_n "checking for UNIQ... " >&6; }
12478          if test ! -x "$tool_specified"; then
12479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12480$as_echo "not found" >&6; }
12481            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12482          fi
12483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12484$as_echo "$tool_specified" >&6; }
12485        fi
12486      fi
12487    fi
12488
12489  fi
12490
12491
12492
12493  if test "x$UNIQ" = x; then
12494    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12495  fi
12496
12497
12498
12499
12500
12501  # Publish this variable in the help.
12502
12503
12504  if [ -z "${WC+x}" ]; then
12505    # The variable is not set by user, try to locate tool using the code snippet
12506    for ac_prog in wc
12507do
12508  # Extract the first word of "$ac_prog", so it can be a program name with args.
12509set dummy $ac_prog; ac_word=$2
12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12511$as_echo_n "checking for $ac_word... " >&6; }
12512if ${ac_cv_path_WC+:} false; then :
12513  $as_echo_n "(cached) " >&6
12514else
12515  case $WC in
12516  [\\/]* | ?:[\\/]*)
12517  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12518  ;;
12519  *)
12520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12521for as_dir in $PATH
12522do
12523  IFS=$as_save_IFS
12524  test -z "$as_dir" && as_dir=.
12525    for ac_exec_ext in '' $ac_executable_extensions; do
12526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12527    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12529    break 2
12530  fi
12531done
12532  done
12533IFS=$as_save_IFS
12534
12535  ;;
12536esac
12537fi
12538WC=$ac_cv_path_WC
12539if test -n "$WC"; then
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12541$as_echo "$WC" >&6; }
12542else
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12544$as_echo "no" >&6; }
12545fi
12546
12547
12548  test -n "$WC" && break
12549done
12550
12551  else
12552    # The variable is set, but is it from the command line or the environment?
12553
12554    # Try to remove the string !WC! from our list.
12555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12557      # If it failed, the variable was not from the command line. Ignore it,
12558      # but warn the user (except for BASH, which is always set by the calling BASH).
12559      if test "xWC" != xBASH; then
12560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12561$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12562      fi
12563      # Try to locate tool using the code snippet
12564      for ac_prog in wc
12565do
12566  # Extract the first word of "$ac_prog", so it can be a program name with args.
12567set dummy $ac_prog; ac_word=$2
12568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12569$as_echo_n "checking for $ac_word... " >&6; }
12570if ${ac_cv_path_WC+:} false; then :
12571  $as_echo_n "(cached) " >&6
12572else
12573  case $WC in
12574  [\\/]* | ?:[\\/]*)
12575  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12576  ;;
12577  *)
12578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12579for as_dir in $PATH
12580do
12581  IFS=$as_save_IFS
12582  test -z "$as_dir" && as_dir=.
12583    for ac_exec_ext in '' $ac_executable_extensions; do
12584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12585    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12587    break 2
12588  fi
12589done
12590  done
12591IFS=$as_save_IFS
12592
12593  ;;
12594esac
12595fi
12596WC=$ac_cv_path_WC
12597if test -n "$WC"; then
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12599$as_echo "$WC" >&6; }
12600else
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12602$as_echo "no" >&6; }
12603fi
12604
12605
12606  test -n "$WC" && break
12607done
12608
12609    else
12610      # If it succeeded, then it was overridden by the user. We will use it
12611      # for the tool.
12612
12613      # First remove it from the list of overridden variables, so we can test
12614      # for unknown variables in the end.
12615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12616
12617      # Check if we try to supply an empty value
12618      if test "x$WC" = x; then
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12620$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12621        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12622$as_echo_n "checking for WC... " >&6; }
12623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12624$as_echo "disabled" >&6; }
12625      else
12626        # Check if the provided tool contains a complete path.
12627        tool_specified="$WC"
12628        tool_basename="${tool_specified##*/}"
12629        if test "x$tool_basename" = "x$tool_specified"; then
12630          # A command without a complete path is provided, search $PATH.
12631          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12632$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12633          # Extract the first word of "$tool_basename", so it can be a program name with args.
12634set dummy $tool_basename; ac_word=$2
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12636$as_echo_n "checking for $ac_word... " >&6; }
12637if ${ac_cv_path_WC+:} false; then :
12638  $as_echo_n "(cached) " >&6
12639else
12640  case $WC in
12641  [\\/]* | ?:[\\/]*)
12642  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12643  ;;
12644  *)
12645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12646for as_dir in $PATH
12647do
12648  IFS=$as_save_IFS
12649  test -z "$as_dir" && as_dir=.
12650    for ac_exec_ext in '' $ac_executable_extensions; do
12651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12652    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12654    break 2
12655  fi
12656done
12657  done
12658IFS=$as_save_IFS
12659
12660  ;;
12661esac
12662fi
12663WC=$ac_cv_path_WC
12664if test -n "$WC"; then
12665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12666$as_echo "$WC" >&6; }
12667else
12668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12669$as_echo "no" >&6; }
12670fi
12671
12672
12673          if test "x$WC" = x; then
12674            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12675          fi
12676        else
12677          # Otherwise we believe it is a complete path. Use it as it is.
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12679$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12680          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12681$as_echo_n "checking for WC... " >&6; }
12682          if test ! -x "$tool_specified"; then
12683            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12684$as_echo "not found" >&6; }
12685            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12686          fi
12687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12688$as_echo "$tool_specified" >&6; }
12689        fi
12690      fi
12691    fi
12692
12693  fi
12694
12695
12696
12697  if test "x$WC" = x; then
12698    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12699  fi
12700
12701
12702
12703
12704
12705  # Publish this variable in the help.
12706
12707
12708  if [ -z "${WHICH+x}" ]; then
12709    # The variable is not set by user, try to locate tool using the code snippet
12710    for ac_prog in which
12711do
12712  # Extract the first word of "$ac_prog", so it can be a program name with args.
12713set dummy $ac_prog; ac_word=$2
12714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12715$as_echo_n "checking for $ac_word... " >&6; }
12716if ${ac_cv_path_WHICH+:} false; then :
12717  $as_echo_n "(cached) " >&6
12718else
12719  case $WHICH in
12720  [\\/]* | ?:[\\/]*)
12721  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12722  ;;
12723  *)
12724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12725for as_dir in $PATH
12726do
12727  IFS=$as_save_IFS
12728  test -z "$as_dir" && as_dir=.
12729    for ac_exec_ext in '' $ac_executable_extensions; do
12730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12731    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12733    break 2
12734  fi
12735done
12736  done
12737IFS=$as_save_IFS
12738
12739  ;;
12740esac
12741fi
12742WHICH=$ac_cv_path_WHICH
12743if test -n "$WHICH"; then
12744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12745$as_echo "$WHICH" >&6; }
12746else
12747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12748$as_echo "no" >&6; }
12749fi
12750
12751
12752  test -n "$WHICH" && break
12753done
12754
12755  else
12756    # The variable is set, but is it from the command line or the environment?
12757
12758    # Try to remove the string !WHICH! from our list.
12759    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12760    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12761      # If it failed, the variable was not from the command line. Ignore it,
12762      # but warn the user (except for BASH, which is always set by the calling BASH).
12763      if test "xWHICH" != xBASH; then
12764        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12765$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12766      fi
12767      # Try to locate tool using the code snippet
12768      for ac_prog in which
12769do
12770  # Extract the first word of "$ac_prog", so it can be a program name with args.
12771set dummy $ac_prog; ac_word=$2
12772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12773$as_echo_n "checking for $ac_word... " >&6; }
12774if ${ac_cv_path_WHICH+:} false; then :
12775  $as_echo_n "(cached) " >&6
12776else
12777  case $WHICH in
12778  [\\/]* | ?:[\\/]*)
12779  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12780  ;;
12781  *)
12782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12783for as_dir in $PATH
12784do
12785  IFS=$as_save_IFS
12786  test -z "$as_dir" && as_dir=.
12787    for ac_exec_ext in '' $ac_executable_extensions; do
12788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12789    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12791    break 2
12792  fi
12793done
12794  done
12795IFS=$as_save_IFS
12796
12797  ;;
12798esac
12799fi
12800WHICH=$ac_cv_path_WHICH
12801if test -n "$WHICH"; then
12802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12803$as_echo "$WHICH" >&6; }
12804else
12805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12806$as_echo "no" >&6; }
12807fi
12808
12809
12810  test -n "$WHICH" && break
12811done
12812
12813    else
12814      # If it succeeded, then it was overridden by the user. We will use it
12815      # for the tool.
12816
12817      # First remove it from the list of overridden variables, so we can test
12818      # for unknown variables in the end.
12819      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12820
12821      # Check if we try to supply an empty value
12822      if test "x$WHICH" = x; then
12823        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12824$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12825        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12826$as_echo_n "checking for WHICH... " >&6; }
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12828$as_echo "disabled" >&6; }
12829      else
12830        # Check if the provided tool contains a complete path.
12831        tool_specified="$WHICH"
12832        tool_basename="${tool_specified##*/}"
12833        if test "x$tool_basename" = "x$tool_specified"; then
12834          # A command without a complete path is provided, search $PATH.
12835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12836$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12837          # Extract the first word of "$tool_basename", so it can be a program name with args.
12838set dummy $tool_basename; ac_word=$2
12839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12840$as_echo_n "checking for $ac_word... " >&6; }
12841if ${ac_cv_path_WHICH+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844  case $WHICH in
12845  [\\/]* | ?:[\\/]*)
12846  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12847  ;;
12848  *)
12849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12850for as_dir in $PATH
12851do
12852  IFS=$as_save_IFS
12853  test -z "$as_dir" && as_dir=.
12854    for ac_exec_ext in '' $ac_executable_extensions; do
12855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12856    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12858    break 2
12859  fi
12860done
12861  done
12862IFS=$as_save_IFS
12863
12864  ;;
12865esac
12866fi
12867WHICH=$ac_cv_path_WHICH
12868if test -n "$WHICH"; then
12869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12870$as_echo "$WHICH" >&6; }
12871else
12872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12873$as_echo "no" >&6; }
12874fi
12875
12876
12877          if test "x$WHICH" = x; then
12878            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12879          fi
12880        else
12881          # Otherwise we believe it is a complete path. Use it as it is.
12882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12883$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12884          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12885$as_echo_n "checking for WHICH... " >&6; }
12886          if test ! -x "$tool_specified"; then
12887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12888$as_echo "not found" >&6; }
12889            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12890          fi
12891          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12892$as_echo "$tool_specified" >&6; }
12893        fi
12894      fi
12895    fi
12896
12897  fi
12898
12899
12900
12901  if test "x$WHICH" = x; then
12902    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12903  fi
12904
12905
12906
12907
12908
12909  # Publish this variable in the help.
12910
12911
12912  if [ -z "${XARGS+x}" ]; then
12913    # The variable is not set by user, try to locate tool using the code snippet
12914    for ac_prog in xargs
12915do
12916  # Extract the first word of "$ac_prog", so it can be a program name with args.
12917set dummy $ac_prog; ac_word=$2
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12919$as_echo_n "checking for $ac_word... " >&6; }
12920if ${ac_cv_path_XARGS+:} false; then :
12921  $as_echo_n "(cached) " >&6
12922else
12923  case $XARGS in
12924  [\\/]* | ?:[\\/]*)
12925  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12926  ;;
12927  *)
12928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12929for as_dir in $PATH
12930do
12931  IFS=$as_save_IFS
12932  test -z "$as_dir" && as_dir=.
12933    for ac_exec_ext in '' $ac_executable_extensions; do
12934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12935    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12937    break 2
12938  fi
12939done
12940  done
12941IFS=$as_save_IFS
12942
12943  ;;
12944esac
12945fi
12946XARGS=$ac_cv_path_XARGS
12947if test -n "$XARGS"; then
12948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12949$as_echo "$XARGS" >&6; }
12950else
12951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12952$as_echo "no" >&6; }
12953fi
12954
12955
12956  test -n "$XARGS" && break
12957done
12958
12959  else
12960    # The variable is set, but is it from the command line or the environment?
12961
12962    # Try to remove the string !XARGS! from our list.
12963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12965      # If it failed, the variable was not from the command line. Ignore it,
12966      # but warn the user (except for BASH, which is always set by the calling BASH).
12967      if test "xXARGS" != xBASH; then
12968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12969$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12970      fi
12971      # Try to locate tool using the code snippet
12972      for ac_prog in xargs
12973do
12974  # Extract the first word of "$ac_prog", so it can be a program name with args.
12975set dummy $ac_prog; ac_word=$2
12976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12977$as_echo_n "checking for $ac_word... " >&6; }
12978if ${ac_cv_path_XARGS+:} false; then :
12979  $as_echo_n "(cached) " >&6
12980else
12981  case $XARGS in
12982  [\\/]* | ?:[\\/]*)
12983  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12984  ;;
12985  *)
12986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12987for as_dir in $PATH
12988do
12989  IFS=$as_save_IFS
12990  test -z "$as_dir" && as_dir=.
12991    for ac_exec_ext in '' $ac_executable_extensions; do
12992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12993    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12995    break 2
12996  fi
12997done
12998  done
12999IFS=$as_save_IFS
13000
13001  ;;
13002esac
13003fi
13004XARGS=$ac_cv_path_XARGS
13005if test -n "$XARGS"; then
13006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13007$as_echo "$XARGS" >&6; }
13008else
13009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13010$as_echo "no" >&6; }
13011fi
13012
13013
13014  test -n "$XARGS" && break
13015done
13016
13017    else
13018      # If it succeeded, then it was overridden by the user. We will use it
13019      # for the tool.
13020
13021      # First remove it from the list of overridden variables, so we can test
13022      # for unknown variables in the end.
13023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13024
13025      # Check if we try to supply an empty value
13026      if test "x$XARGS" = x; then
13027        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13028$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13030$as_echo_n "checking for XARGS... " >&6; }
13031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13032$as_echo "disabled" >&6; }
13033      else
13034        # Check if the provided tool contains a complete path.
13035        tool_specified="$XARGS"
13036        tool_basename="${tool_specified##*/}"
13037        if test "x$tool_basename" = "x$tool_specified"; then
13038          # A command without a complete path is provided, search $PATH.
13039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13040$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13041          # Extract the first word of "$tool_basename", so it can be a program name with args.
13042set dummy $tool_basename; ac_word=$2
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13044$as_echo_n "checking for $ac_word... " >&6; }
13045if ${ac_cv_path_XARGS+:} false; then :
13046  $as_echo_n "(cached) " >&6
13047else
13048  case $XARGS in
13049  [\\/]* | ?:[\\/]*)
13050  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13051  ;;
13052  *)
13053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054for as_dir in $PATH
13055do
13056  IFS=$as_save_IFS
13057  test -z "$as_dir" && as_dir=.
13058    for ac_exec_ext in '' $ac_executable_extensions; do
13059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062    break 2
13063  fi
13064done
13065  done
13066IFS=$as_save_IFS
13067
13068  ;;
13069esac
13070fi
13071XARGS=$ac_cv_path_XARGS
13072if test -n "$XARGS"; then
13073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13074$as_echo "$XARGS" >&6; }
13075else
13076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
13078fi
13079
13080
13081          if test "x$XARGS" = x; then
13082            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13083          fi
13084        else
13085          # Otherwise we believe it is a complete path. Use it as it is.
13086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13087$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13089$as_echo_n "checking for XARGS... " >&6; }
13090          if test ! -x "$tool_specified"; then
13091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13092$as_echo "not found" >&6; }
13093            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13094          fi
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13096$as_echo "$tool_specified" >&6; }
13097        fi
13098      fi
13099    fi
13100
13101  fi
13102
13103
13104
13105  if test "x$XARGS" = x; then
13106    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13107  fi
13108
13109
13110
13111  # Then required tools that require some special treatment.
13112
13113
13114  # Publish this variable in the help.
13115
13116
13117  if [ -z "${AWK+x}" ]; then
13118    # The variable is not set by user, try to locate tool using the code snippet
13119    for ac_prog in gawk mawk nawk awk
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_prog_AWK+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  if test -n "$AWK"; then
13129  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13130else
13131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13132for as_dir in $PATH
13133do
13134  IFS=$as_save_IFS
13135  test -z "$as_dir" && as_dir=.
13136    for ac_exec_ext in '' $ac_executable_extensions; do
13137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13138    ac_cv_prog_AWK="$ac_prog"
13139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13140    break 2
13141  fi
13142done
13143  done
13144IFS=$as_save_IFS
13145
13146fi
13147fi
13148AWK=$ac_cv_prog_AWK
13149if test -n "$AWK"; then
13150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13151$as_echo "$AWK" >&6; }
13152else
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13154$as_echo "no" >&6; }
13155fi
13156
13157
13158  test -n "$AWK" && break
13159done
13160
13161  else
13162    # The variable is set, but is it from the command line or the environment?
13163
13164    # Try to remove the string !AWK! from our list.
13165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13167      # If it failed, the variable was not from the command line. Ignore it,
13168      # but warn the user (except for BASH, which is always set by the calling BASH).
13169      if test "xAWK" != xBASH; then
13170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13171$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13172      fi
13173      # Try to locate tool using the code snippet
13174      for ac_prog in gawk mawk nawk awk
13175do
13176  # Extract the first word of "$ac_prog", so it can be a program name with args.
13177set dummy $ac_prog; ac_word=$2
13178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13179$as_echo_n "checking for $ac_word... " >&6; }
13180if ${ac_cv_prog_AWK+:} false; then :
13181  $as_echo_n "(cached) " >&6
13182else
13183  if test -n "$AWK"; then
13184  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13185else
13186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13187for as_dir in $PATH
13188do
13189  IFS=$as_save_IFS
13190  test -z "$as_dir" && as_dir=.
13191    for ac_exec_ext in '' $ac_executable_extensions; do
13192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13193    ac_cv_prog_AWK="$ac_prog"
13194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13195    break 2
13196  fi
13197done
13198  done
13199IFS=$as_save_IFS
13200
13201fi
13202fi
13203AWK=$ac_cv_prog_AWK
13204if test -n "$AWK"; then
13205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13206$as_echo "$AWK" >&6; }
13207else
13208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13209$as_echo "no" >&6; }
13210fi
13211
13212
13213  test -n "$AWK" && break
13214done
13215
13216    else
13217      # If it succeeded, then it was overridden by the user. We will use it
13218      # for the tool.
13219
13220      # First remove it from the list of overridden variables, so we can test
13221      # for unknown variables in the end.
13222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13223
13224      # Check if we try to supply an empty value
13225      if test "x$AWK" = x; then
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13227$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13229$as_echo_n "checking for AWK... " >&6; }
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13231$as_echo "disabled" >&6; }
13232      else
13233        # Check if the provided tool contains a complete path.
13234        tool_specified="$AWK"
13235        tool_basename="${tool_specified##*/}"
13236        if test "x$tool_basename" = "x$tool_specified"; then
13237          # A command without a complete path is provided, search $PATH.
13238          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13239$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13240          # Extract the first word of "$tool_basename", so it can be a program name with args.
13241set dummy $tool_basename; ac_word=$2
13242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13243$as_echo_n "checking for $ac_word... " >&6; }
13244if ${ac_cv_path_AWK+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247  case $AWK in
13248  [\\/]* | ?:[\\/]*)
13249  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13250  ;;
13251  *)
13252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13253for as_dir in $PATH
13254do
13255  IFS=$as_save_IFS
13256  test -z "$as_dir" && as_dir=.
13257    for ac_exec_ext in '' $ac_executable_extensions; do
13258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13259    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13261    break 2
13262  fi
13263done
13264  done
13265IFS=$as_save_IFS
13266
13267  ;;
13268esac
13269fi
13270AWK=$ac_cv_path_AWK
13271if test -n "$AWK"; then
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13273$as_echo "$AWK" >&6; }
13274else
13275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276$as_echo "no" >&6; }
13277fi
13278
13279
13280          if test "x$AWK" = x; then
13281            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13282          fi
13283        else
13284          # Otherwise we believe it is a complete path. Use it as it is.
13285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13286$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13288$as_echo_n "checking for AWK... " >&6; }
13289          if test ! -x "$tool_specified"; then
13290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13291$as_echo "not found" >&6; }
13292            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13293          fi
13294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13295$as_echo "$tool_specified" >&6; }
13296        fi
13297      fi
13298    fi
13299
13300  fi
13301
13302
13303  if test "x$AWK" = x; then
13304    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13305  fi
13306
13307
13308
13309
13310  # Publish this variable in the help.
13311
13312
13313  if [ -z "${GREP+x}" ]; then
13314    # The variable is not set by user, try to locate tool using the code snippet
13315    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13316$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13317if ${ac_cv_path_GREP+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test -z "$GREP"; then
13321  ac_path_GREP_found=false
13322  # Loop through the user's path and test for each of PROGNAME-LIST
13323  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13324for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13325do
13326  IFS=$as_save_IFS
13327  test -z "$as_dir" && as_dir=.
13328    for ac_prog in grep ggrep; do
13329    for ac_exec_ext in '' $ac_executable_extensions; do
13330      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13331      as_fn_executable_p "$ac_path_GREP" || continue
13332# Check for GNU ac_path_GREP and select it if it is found.
13333  # Check for GNU $ac_path_GREP
13334case `"$ac_path_GREP" --version 2>&1` in
13335*GNU*)
13336  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13337*)
13338  ac_count=0
13339  $as_echo_n 0123456789 >"conftest.in"
13340  while :
13341  do
13342    cat "conftest.in" "conftest.in" >"conftest.tmp"
13343    mv "conftest.tmp" "conftest.in"
13344    cp "conftest.in" "conftest.nl"
13345    $as_echo 'GREP' >> "conftest.nl"
13346    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13347    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13348    as_fn_arith $ac_count + 1 && ac_count=$as_val
13349    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13350      # Best one so far, save it but keep looking for a better one
13351      ac_cv_path_GREP="$ac_path_GREP"
13352      ac_path_GREP_max=$ac_count
13353    fi
13354    # 10*(2^10) chars as input seems more than enough
13355    test $ac_count -gt 10 && break
13356  done
13357  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13358esac
13359
13360      $ac_path_GREP_found && break 3
13361    done
13362  done
13363  done
13364IFS=$as_save_IFS
13365  if test -z "$ac_cv_path_GREP"; then
13366    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13367  fi
13368else
13369  ac_cv_path_GREP=$GREP
13370fi
13371
13372fi
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13374$as_echo "$ac_cv_path_GREP" >&6; }
13375 GREP="$ac_cv_path_GREP"
13376
13377
13378  else
13379    # The variable is set, but is it from the command line or the environment?
13380
13381    # Try to remove the string !GREP! from our list.
13382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13384      # If it failed, the variable was not from the command line. Ignore it,
13385      # but warn the user (except for BASH, which is always set by the calling BASH).
13386      if test "xGREP" != xBASH; then
13387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13388$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13389      fi
13390      # Try to locate tool using the code snippet
13391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13392$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13393if ${ac_cv_path_GREP+:} false; then :
13394  $as_echo_n "(cached) " >&6
13395else
13396  if test -z "$GREP"; then
13397  ac_path_GREP_found=false
13398  # Loop through the user's path and test for each of PROGNAME-LIST
13399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13401do
13402  IFS=$as_save_IFS
13403  test -z "$as_dir" && as_dir=.
13404    for ac_prog in grep ggrep; do
13405    for ac_exec_ext in '' $ac_executable_extensions; do
13406      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13407      as_fn_executable_p "$ac_path_GREP" || continue
13408# Check for GNU ac_path_GREP and select it if it is found.
13409  # Check for GNU $ac_path_GREP
13410case `"$ac_path_GREP" --version 2>&1` in
13411*GNU*)
13412  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13413*)
13414  ac_count=0
13415  $as_echo_n 0123456789 >"conftest.in"
13416  while :
13417  do
13418    cat "conftest.in" "conftest.in" >"conftest.tmp"
13419    mv "conftest.tmp" "conftest.in"
13420    cp "conftest.in" "conftest.nl"
13421    $as_echo 'GREP' >> "conftest.nl"
13422    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13423    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13424    as_fn_arith $ac_count + 1 && ac_count=$as_val
13425    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13426      # Best one so far, save it but keep looking for a better one
13427      ac_cv_path_GREP="$ac_path_GREP"
13428      ac_path_GREP_max=$ac_count
13429    fi
13430    # 10*(2^10) chars as input seems more than enough
13431    test $ac_count -gt 10 && break
13432  done
13433  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13434esac
13435
13436      $ac_path_GREP_found && break 3
13437    done
13438  done
13439  done
13440IFS=$as_save_IFS
13441  if test -z "$ac_cv_path_GREP"; then
13442    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13443  fi
13444else
13445  ac_cv_path_GREP=$GREP
13446fi
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13450$as_echo "$ac_cv_path_GREP" >&6; }
13451 GREP="$ac_cv_path_GREP"
13452
13453
13454    else
13455      # If it succeeded, then it was overridden by the user. We will use it
13456      # for the tool.
13457
13458      # First remove it from the list of overridden variables, so we can test
13459      # for unknown variables in the end.
13460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13461
13462      # Check if we try to supply an empty value
13463      if test "x$GREP" = x; then
13464        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13465$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13467$as_echo_n "checking for GREP... " >&6; }
13468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13469$as_echo "disabled" >&6; }
13470      else
13471        # Check if the provided tool contains a complete path.
13472        tool_specified="$GREP"
13473        tool_basename="${tool_specified##*/}"
13474        if test "x$tool_basename" = "x$tool_specified"; then
13475          # A command without a complete path is provided, search $PATH.
13476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13477$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13478          # Extract the first word of "$tool_basename", so it can be a program name with args.
13479set dummy $tool_basename; ac_word=$2
13480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13481$as_echo_n "checking for $ac_word... " >&6; }
13482if ${ac_cv_path_GREP+:} false; then :
13483  $as_echo_n "(cached) " >&6
13484else
13485  case $GREP in
13486  [\\/]* | ?:[\\/]*)
13487  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13488  ;;
13489  *)
13490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13491for as_dir in $PATH
13492do
13493  IFS=$as_save_IFS
13494  test -z "$as_dir" && as_dir=.
13495    for ac_exec_ext in '' $ac_executable_extensions; do
13496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13497    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13499    break 2
13500  fi
13501done
13502  done
13503IFS=$as_save_IFS
13504
13505  ;;
13506esac
13507fi
13508GREP=$ac_cv_path_GREP
13509if test -n "$GREP"; then
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13511$as_echo "$GREP" >&6; }
13512else
13513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13514$as_echo "no" >&6; }
13515fi
13516
13517
13518          if test "x$GREP" = x; then
13519            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13520          fi
13521        else
13522          # Otherwise we believe it is a complete path. Use it as it is.
13523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13524$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13525          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13526$as_echo_n "checking for GREP... " >&6; }
13527          if test ! -x "$tool_specified"; then
13528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13529$as_echo "not found" >&6; }
13530            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13531          fi
13532          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13533$as_echo "$tool_specified" >&6; }
13534        fi
13535      fi
13536    fi
13537
13538  fi
13539
13540
13541  if test "x$GREP" = x; then
13542    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13543  fi
13544
13545
13546
13547
13548  # Publish this variable in the help.
13549
13550
13551  if [ -z "${EGREP+x}" ]; then
13552    # The variable is not set by user, try to locate tool using the code snippet
13553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13554$as_echo_n "checking for egrep... " >&6; }
13555if ${ac_cv_path_EGREP+:} false; then :
13556  $as_echo_n "(cached) " >&6
13557else
13558  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13559   then ac_cv_path_EGREP="$GREP -E"
13560   else
13561     if test -z "$EGREP"; then
13562  ac_path_EGREP_found=false
13563  # Loop through the user's path and test for each of PROGNAME-LIST
13564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13565for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13566do
13567  IFS=$as_save_IFS
13568  test -z "$as_dir" && as_dir=.
13569    for ac_prog in egrep; do
13570    for ac_exec_ext in '' $ac_executable_extensions; do
13571      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13572      as_fn_executable_p "$ac_path_EGREP" || continue
13573# Check for GNU ac_path_EGREP and select it if it is found.
13574  # Check for GNU $ac_path_EGREP
13575case `"$ac_path_EGREP" --version 2>&1` in
13576*GNU*)
13577  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13578*)
13579  ac_count=0
13580  $as_echo_n 0123456789 >"conftest.in"
13581  while :
13582  do
13583    cat "conftest.in" "conftest.in" >"conftest.tmp"
13584    mv "conftest.tmp" "conftest.in"
13585    cp "conftest.in" "conftest.nl"
13586    $as_echo 'EGREP' >> "conftest.nl"
13587    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13588    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13589    as_fn_arith $ac_count + 1 && ac_count=$as_val
13590    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13591      # Best one so far, save it but keep looking for a better one
13592      ac_cv_path_EGREP="$ac_path_EGREP"
13593      ac_path_EGREP_max=$ac_count
13594    fi
13595    # 10*(2^10) chars as input seems more than enough
13596    test $ac_count -gt 10 && break
13597  done
13598  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13599esac
13600
13601      $ac_path_EGREP_found && break 3
13602    done
13603  done
13604  done
13605IFS=$as_save_IFS
13606  if test -z "$ac_cv_path_EGREP"; then
13607    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13608  fi
13609else
13610  ac_cv_path_EGREP=$EGREP
13611fi
13612
13613   fi
13614fi
13615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13616$as_echo "$ac_cv_path_EGREP" >&6; }
13617 EGREP="$ac_cv_path_EGREP"
13618
13619
13620  else
13621    # The variable is set, but is it from the command line or the environment?
13622
13623    # Try to remove the string !EGREP! from our list.
13624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13626      # If it failed, the variable was not from the command line. Ignore it,
13627      # but warn the user (except for BASH, which is always set by the calling BASH).
13628      if test "xEGREP" != xBASH; then
13629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13630$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13631      fi
13632      # Try to locate tool using the code snippet
13633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13634$as_echo_n "checking for egrep... " >&6; }
13635if ${ac_cv_path_EGREP+:} false; then :
13636  $as_echo_n "(cached) " >&6
13637else
13638  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13639   then ac_cv_path_EGREP="$GREP -E"
13640   else
13641     if test -z "$EGREP"; then
13642  ac_path_EGREP_found=false
13643  # Loop through the user's path and test for each of PROGNAME-LIST
13644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13645for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13646do
13647  IFS=$as_save_IFS
13648  test -z "$as_dir" && as_dir=.
13649    for ac_prog in egrep; do
13650    for ac_exec_ext in '' $ac_executable_extensions; do
13651      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13652      as_fn_executable_p "$ac_path_EGREP" || continue
13653# Check for GNU ac_path_EGREP and select it if it is found.
13654  # Check for GNU $ac_path_EGREP
13655case `"$ac_path_EGREP" --version 2>&1` in
13656*GNU*)
13657  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13658*)
13659  ac_count=0
13660  $as_echo_n 0123456789 >"conftest.in"
13661  while :
13662  do
13663    cat "conftest.in" "conftest.in" >"conftest.tmp"
13664    mv "conftest.tmp" "conftest.in"
13665    cp "conftest.in" "conftest.nl"
13666    $as_echo 'EGREP' >> "conftest.nl"
13667    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13668    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13669    as_fn_arith $ac_count + 1 && ac_count=$as_val
13670    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13671      # Best one so far, save it but keep looking for a better one
13672      ac_cv_path_EGREP="$ac_path_EGREP"
13673      ac_path_EGREP_max=$ac_count
13674    fi
13675    # 10*(2^10) chars as input seems more than enough
13676    test $ac_count -gt 10 && break
13677  done
13678  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13679esac
13680
13681      $ac_path_EGREP_found && break 3
13682    done
13683  done
13684  done
13685IFS=$as_save_IFS
13686  if test -z "$ac_cv_path_EGREP"; then
13687    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13688  fi
13689else
13690  ac_cv_path_EGREP=$EGREP
13691fi
13692
13693   fi
13694fi
13695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13696$as_echo "$ac_cv_path_EGREP" >&6; }
13697 EGREP="$ac_cv_path_EGREP"
13698
13699
13700    else
13701      # If it succeeded, then it was overridden by the user. We will use it
13702      # for the tool.
13703
13704      # First remove it from the list of overridden variables, so we can test
13705      # for unknown variables in the end.
13706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13707
13708      # Check if we try to supply an empty value
13709      if test "x$EGREP" = x; then
13710        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13711$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13713$as_echo_n "checking for EGREP... " >&6; }
13714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13715$as_echo "disabled" >&6; }
13716      else
13717        # Check if the provided tool contains a complete path.
13718        tool_specified="$EGREP"
13719        tool_basename="${tool_specified##*/}"
13720        if test "x$tool_basename" = "x$tool_specified"; then
13721          # A command without a complete path is provided, search $PATH.
13722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13723$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13724          # Extract the first word of "$tool_basename", so it can be a program name with args.
13725set dummy $tool_basename; ac_word=$2
13726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13727$as_echo_n "checking for $ac_word... " >&6; }
13728if ${ac_cv_path_EGREP+:} false; then :
13729  $as_echo_n "(cached) " >&6
13730else
13731  case $EGREP in
13732  [\\/]* | ?:[\\/]*)
13733  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13734  ;;
13735  *)
13736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13737for as_dir in $PATH
13738do
13739  IFS=$as_save_IFS
13740  test -z "$as_dir" && as_dir=.
13741    for ac_exec_ext in '' $ac_executable_extensions; do
13742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13743    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13745    break 2
13746  fi
13747done
13748  done
13749IFS=$as_save_IFS
13750
13751  ;;
13752esac
13753fi
13754EGREP=$ac_cv_path_EGREP
13755if test -n "$EGREP"; then
13756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13757$as_echo "$EGREP" >&6; }
13758else
13759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13760$as_echo "no" >&6; }
13761fi
13762
13763
13764          if test "x$EGREP" = x; then
13765            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13766          fi
13767        else
13768          # Otherwise we believe it is a complete path. Use it as it is.
13769          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13770$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13772$as_echo_n "checking for EGREP... " >&6; }
13773          if test ! -x "$tool_specified"; then
13774            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13775$as_echo "not found" >&6; }
13776            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13777          fi
13778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13779$as_echo "$tool_specified" >&6; }
13780        fi
13781      fi
13782    fi
13783
13784  fi
13785
13786
13787  if test "x$EGREP" = x; then
13788    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13789  fi
13790
13791
13792
13793
13794  # Publish this variable in the help.
13795
13796
13797  if [ -z "${FGREP+x}" ]; then
13798    # The variable is not set by user, try to locate tool using the code snippet
13799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13800$as_echo_n "checking for fgrep... " >&6; }
13801if ${ac_cv_path_FGREP+:} false; then :
13802  $as_echo_n "(cached) " >&6
13803else
13804  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13805   then ac_cv_path_FGREP="$GREP -F"
13806   else
13807     if test -z "$FGREP"; then
13808  ac_path_FGREP_found=false
13809  # Loop through the user's path and test for each of PROGNAME-LIST
13810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13811for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13812do
13813  IFS=$as_save_IFS
13814  test -z "$as_dir" && as_dir=.
13815    for ac_prog in fgrep; do
13816    for ac_exec_ext in '' $ac_executable_extensions; do
13817      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13818      as_fn_executable_p "$ac_path_FGREP" || continue
13819# Check for GNU ac_path_FGREP and select it if it is found.
13820  # Check for GNU $ac_path_FGREP
13821case `"$ac_path_FGREP" --version 2>&1` in
13822*GNU*)
13823  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13824*)
13825  ac_count=0
13826  $as_echo_n 0123456789 >"conftest.in"
13827  while :
13828  do
13829    cat "conftest.in" "conftest.in" >"conftest.tmp"
13830    mv "conftest.tmp" "conftest.in"
13831    cp "conftest.in" "conftest.nl"
13832    $as_echo 'FGREP' >> "conftest.nl"
13833    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13834    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13835    as_fn_arith $ac_count + 1 && ac_count=$as_val
13836    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13837      # Best one so far, save it but keep looking for a better one
13838      ac_cv_path_FGREP="$ac_path_FGREP"
13839      ac_path_FGREP_max=$ac_count
13840    fi
13841    # 10*(2^10) chars as input seems more than enough
13842    test $ac_count -gt 10 && break
13843  done
13844  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13845esac
13846
13847      $ac_path_FGREP_found && break 3
13848    done
13849  done
13850  done
13851IFS=$as_save_IFS
13852  if test -z "$ac_cv_path_FGREP"; then
13853    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13854  fi
13855else
13856  ac_cv_path_FGREP=$FGREP
13857fi
13858
13859   fi
13860fi
13861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13862$as_echo "$ac_cv_path_FGREP" >&6; }
13863 FGREP="$ac_cv_path_FGREP"
13864
13865
13866  else
13867    # The variable is set, but is it from the command line or the environment?
13868
13869    # Try to remove the string !FGREP! from our list.
13870    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13871    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13872      # If it failed, the variable was not from the command line. Ignore it,
13873      # but warn the user (except for BASH, which is always set by the calling BASH).
13874      if test "xFGREP" != xBASH; then
13875        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13876$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13877      fi
13878      # Try to locate tool using the code snippet
13879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13880$as_echo_n "checking for fgrep... " >&6; }
13881if ${ac_cv_path_FGREP+:} false; then :
13882  $as_echo_n "(cached) " >&6
13883else
13884  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13885   then ac_cv_path_FGREP="$GREP -F"
13886   else
13887     if test -z "$FGREP"; then
13888  ac_path_FGREP_found=false
13889  # Loop through the user's path and test for each of PROGNAME-LIST
13890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13891for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13892do
13893  IFS=$as_save_IFS
13894  test -z "$as_dir" && as_dir=.
13895    for ac_prog in fgrep; do
13896    for ac_exec_ext in '' $ac_executable_extensions; do
13897      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13898      as_fn_executable_p "$ac_path_FGREP" || continue
13899# Check for GNU ac_path_FGREP and select it if it is found.
13900  # Check for GNU $ac_path_FGREP
13901case `"$ac_path_FGREP" --version 2>&1` in
13902*GNU*)
13903  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13904*)
13905  ac_count=0
13906  $as_echo_n 0123456789 >"conftest.in"
13907  while :
13908  do
13909    cat "conftest.in" "conftest.in" >"conftest.tmp"
13910    mv "conftest.tmp" "conftest.in"
13911    cp "conftest.in" "conftest.nl"
13912    $as_echo 'FGREP' >> "conftest.nl"
13913    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13914    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13915    as_fn_arith $ac_count + 1 && ac_count=$as_val
13916    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13917      # Best one so far, save it but keep looking for a better one
13918      ac_cv_path_FGREP="$ac_path_FGREP"
13919      ac_path_FGREP_max=$ac_count
13920    fi
13921    # 10*(2^10) chars as input seems more than enough
13922    test $ac_count -gt 10 && break
13923  done
13924  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13925esac
13926
13927      $ac_path_FGREP_found && break 3
13928    done
13929  done
13930  done
13931IFS=$as_save_IFS
13932  if test -z "$ac_cv_path_FGREP"; then
13933    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13934  fi
13935else
13936  ac_cv_path_FGREP=$FGREP
13937fi
13938
13939   fi
13940fi
13941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13942$as_echo "$ac_cv_path_FGREP" >&6; }
13943 FGREP="$ac_cv_path_FGREP"
13944
13945
13946    else
13947      # If it succeeded, then it was overridden by the user. We will use it
13948      # for the tool.
13949
13950      # First remove it from the list of overridden variables, so we can test
13951      # for unknown variables in the end.
13952      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13953
13954      # Check if we try to supply an empty value
13955      if test "x$FGREP" = x; then
13956        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13957$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13959$as_echo_n "checking for FGREP... " >&6; }
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13961$as_echo "disabled" >&6; }
13962      else
13963        # Check if the provided tool contains a complete path.
13964        tool_specified="$FGREP"
13965        tool_basename="${tool_specified##*/}"
13966        if test "x$tool_basename" = "x$tool_specified"; then
13967          # A command without a complete path is provided, search $PATH.
13968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13969$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13970          # Extract the first word of "$tool_basename", so it can be a program name with args.
13971set dummy $tool_basename; ac_word=$2
13972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13973$as_echo_n "checking for $ac_word... " >&6; }
13974if ${ac_cv_path_FGREP+:} false; then :
13975  $as_echo_n "(cached) " >&6
13976else
13977  case $FGREP in
13978  [\\/]* | ?:[\\/]*)
13979  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13980  ;;
13981  *)
13982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13983for as_dir in $PATH
13984do
13985  IFS=$as_save_IFS
13986  test -z "$as_dir" && as_dir=.
13987    for ac_exec_ext in '' $ac_executable_extensions; do
13988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13989    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13991    break 2
13992  fi
13993done
13994  done
13995IFS=$as_save_IFS
13996
13997  ;;
13998esac
13999fi
14000FGREP=$ac_cv_path_FGREP
14001if test -n "$FGREP"; then
14002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14003$as_echo "$FGREP" >&6; }
14004else
14005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14006$as_echo "no" >&6; }
14007fi
14008
14009
14010          if test "x$FGREP" = x; then
14011            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14012          fi
14013        else
14014          # Otherwise we believe it is a complete path. Use it as it is.
14015          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14016$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14017          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14018$as_echo_n "checking for FGREP... " >&6; }
14019          if test ! -x "$tool_specified"; then
14020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14021$as_echo "not found" >&6; }
14022            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14023          fi
14024          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14025$as_echo "$tool_specified" >&6; }
14026        fi
14027      fi
14028    fi
14029
14030  fi
14031
14032
14033  if test "x$FGREP" = x; then
14034    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14035  fi
14036
14037
14038
14039
14040  # Publish this variable in the help.
14041
14042
14043  if [ -z "${SED+x}" ]; then
14044    # The variable is not set by user, try to locate tool using the code snippet
14045    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14046$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14047if ${ac_cv_path_SED+:} false; then :
14048  $as_echo_n "(cached) " >&6
14049else
14050            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14051     for ac_i in 1 2 3 4 5 6 7; do
14052       ac_script="$ac_script$as_nl$ac_script"
14053     done
14054     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14055     { ac_script=; unset ac_script;}
14056     if test -z "$SED"; then
14057  ac_path_SED_found=false
14058  # Loop through the user's path and test for each of PROGNAME-LIST
14059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14060for as_dir in $PATH
14061do
14062  IFS=$as_save_IFS
14063  test -z "$as_dir" && as_dir=.
14064    for ac_prog in sed gsed; do
14065    for ac_exec_ext in '' $ac_executable_extensions; do
14066      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14067      as_fn_executable_p "$ac_path_SED" || continue
14068# Check for GNU ac_path_SED and select it if it is found.
14069  # Check for GNU $ac_path_SED
14070case `"$ac_path_SED" --version 2>&1` in
14071*GNU*)
14072  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14073*)
14074  ac_count=0
14075  $as_echo_n 0123456789 >"conftest.in"
14076  while :
14077  do
14078    cat "conftest.in" "conftest.in" >"conftest.tmp"
14079    mv "conftest.tmp" "conftest.in"
14080    cp "conftest.in" "conftest.nl"
14081    $as_echo '' >> "conftest.nl"
14082    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14083    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14084    as_fn_arith $ac_count + 1 && ac_count=$as_val
14085    if test $ac_count -gt ${ac_path_SED_max-0}; then
14086      # Best one so far, save it but keep looking for a better one
14087      ac_cv_path_SED="$ac_path_SED"
14088      ac_path_SED_max=$ac_count
14089    fi
14090    # 10*(2^10) chars as input seems more than enough
14091    test $ac_count -gt 10 && break
14092  done
14093  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14094esac
14095
14096      $ac_path_SED_found && break 3
14097    done
14098  done
14099  done
14100IFS=$as_save_IFS
14101  if test -z "$ac_cv_path_SED"; then
14102    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14103  fi
14104else
14105  ac_cv_path_SED=$SED
14106fi
14107
14108fi
14109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14110$as_echo "$ac_cv_path_SED" >&6; }
14111 SED="$ac_cv_path_SED"
14112  rm -f conftest.sed
14113
14114  else
14115    # The variable is set, but is it from the command line or the environment?
14116
14117    # Try to remove the string !SED! from our list.
14118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14120      # If it failed, the variable was not from the command line. Ignore it,
14121      # but warn the user (except for BASH, which is always set by the calling BASH).
14122      if test "xSED" != xBASH; then
14123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14124$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14125      fi
14126      # Try to locate tool using the code snippet
14127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14128$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14129if ${ac_cv_path_SED+:} false; then :
14130  $as_echo_n "(cached) " >&6
14131else
14132            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14133     for ac_i in 1 2 3 4 5 6 7; do
14134       ac_script="$ac_script$as_nl$ac_script"
14135     done
14136     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14137     { ac_script=; unset ac_script;}
14138     if test -z "$SED"; then
14139  ac_path_SED_found=false
14140  # Loop through the user's path and test for each of PROGNAME-LIST
14141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14142for as_dir in $PATH
14143do
14144  IFS=$as_save_IFS
14145  test -z "$as_dir" && as_dir=.
14146    for ac_prog in sed gsed; do
14147    for ac_exec_ext in '' $ac_executable_extensions; do
14148      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14149      as_fn_executable_p "$ac_path_SED" || continue
14150# Check for GNU ac_path_SED and select it if it is found.
14151  # Check for GNU $ac_path_SED
14152case `"$ac_path_SED" --version 2>&1` in
14153*GNU*)
14154  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14155*)
14156  ac_count=0
14157  $as_echo_n 0123456789 >"conftest.in"
14158  while :
14159  do
14160    cat "conftest.in" "conftest.in" >"conftest.tmp"
14161    mv "conftest.tmp" "conftest.in"
14162    cp "conftest.in" "conftest.nl"
14163    $as_echo '' >> "conftest.nl"
14164    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14165    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14166    as_fn_arith $ac_count + 1 && ac_count=$as_val
14167    if test $ac_count -gt ${ac_path_SED_max-0}; then
14168      # Best one so far, save it but keep looking for a better one
14169      ac_cv_path_SED="$ac_path_SED"
14170      ac_path_SED_max=$ac_count
14171    fi
14172    # 10*(2^10) chars as input seems more than enough
14173    test $ac_count -gt 10 && break
14174  done
14175  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14176esac
14177
14178      $ac_path_SED_found && break 3
14179    done
14180  done
14181  done
14182IFS=$as_save_IFS
14183  if test -z "$ac_cv_path_SED"; then
14184    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14185  fi
14186else
14187  ac_cv_path_SED=$SED
14188fi
14189
14190fi
14191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14192$as_echo "$ac_cv_path_SED" >&6; }
14193 SED="$ac_cv_path_SED"
14194  rm -f conftest.sed
14195
14196    else
14197      # If it succeeded, then it was overridden by the user. We will use it
14198      # for the tool.
14199
14200      # First remove it from the list of overridden variables, so we can test
14201      # for unknown variables in the end.
14202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14203
14204      # Check if we try to supply an empty value
14205      if test "x$SED" = x; then
14206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14207$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14209$as_echo_n "checking for SED... " >&6; }
14210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14211$as_echo "disabled" >&6; }
14212      else
14213        # Check if the provided tool contains a complete path.
14214        tool_specified="$SED"
14215        tool_basename="${tool_specified##*/}"
14216        if test "x$tool_basename" = "x$tool_specified"; then
14217          # A command without a complete path is provided, search $PATH.
14218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14219$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14220          # Extract the first word of "$tool_basename", so it can be a program name with args.
14221set dummy $tool_basename; ac_word=$2
14222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14223$as_echo_n "checking for $ac_word... " >&6; }
14224if ${ac_cv_path_SED+:} false; then :
14225  $as_echo_n "(cached) " >&6
14226else
14227  case $SED in
14228  [\\/]* | ?:[\\/]*)
14229  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14230  ;;
14231  *)
14232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14233for as_dir in $PATH
14234do
14235  IFS=$as_save_IFS
14236  test -z "$as_dir" && as_dir=.
14237    for ac_exec_ext in '' $ac_executable_extensions; do
14238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14239    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14241    break 2
14242  fi
14243done
14244  done
14245IFS=$as_save_IFS
14246
14247  ;;
14248esac
14249fi
14250SED=$ac_cv_path_SED
14251if test -n "$SED"; then
14252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14253$as_echo "$SED" >&6; }
14254else
14255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14256$as_echo "no" >&6; }
14257fi
14258
14259
14260          if test "x$SED" = x; then
14261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14262          fi
14263        else
14264          # Otherwise we believe it is a complete path. Use it as it is.
14265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14266$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14268$as_echo_n "checking for SED... " >&6; }
14269          if test ! -x "$tool_specified"; then
14270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14271$as_echo "not found" >&6; }
14272            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14273          fi
14274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14275$as_echo "$tool_specified" >&6; }
14276        fi
14277      fi
14278    fi
14279
14280  fi
14281
14282
14283  if test "x$SED" = x; then
14284    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14285  fi
14286
14287
14288
14289  # Always force rm.
14290  RM="$RM -f"
14291
14292  # pwd behaves differently on various platforms and some don't support the -L flag.
14293  # Always use the bash builtin pwd to get uniform behavior.
14294  THEPWDCMD=pwd
14295
14296  # These are not required on all platforms
14297
14298
14299  # Publish this variable in the help.
14300
14301
14302  if [ -z "${CYGPATH+x}" ]; then
14303    # The variable is not set by user, try to locate tool using the code snippet
14304    for ac_prog in cygpath
14305do
14306  # Extract the first word of "$ac_prog", so it can be a program name with args.
14307set dummy $ac_prog; ac_word=$2
14308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14309$as_echo_n "checking for $ac_word... " >&6; }
14310if ${ac_cv_path_CYGPATH+:} false; then :
14311  $as_echo_n "(cached) " >&6
14312else
14313  case $CYGPATH in
14314  [\\/]* | ?:[\\/]*)
14315  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14316  ;;
14317  *)
14318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14319for as_dir in $PATH
14320do
14321  IFS=$as_save_IFS
14322  test -z "$as_dir" && as_dir=.
14323    for ac_exec_ext in '' $ac_executable_extensions; do
14324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14325    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14327    break 2
14328  fi
14329done
14330  done
14331IFS=$as_save_IFS
14332
14333  ;;
14334esac
14335fi
14336CYGPATH=$ac_cv_path_CYGPATH
14337if test -n "$CYGPATH"; then
14338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14339$as_echo "$CYGPATH" >&6; }
14340else
14341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14342$as_echo "no" >&6; }
14343fi
14344
14345
14346  test -n "$CYGPATH" && break
14347done
14348
14349  else
14350    # The variable is set, but is it from the command line or the environment?
14351
14352    # Try to remove the string !CYGPATH! from our list.
14353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14355      # If it failed, the variable was not from the command line. Ignore it,
14356      # but warn the user (except for BASH, which is always set by the calling BASH).
14357      if test "xCYGPATH" != xBASH; then
14358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14359$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14360      fi
14361      # Try to locate tool using the code snippet
14362      for ac_prog in cygpath
14363do
14364  # Extract the first word of "$ac_prog", so it can be a program name with args.
14365set dummy $ac_prog; ac_word=$2
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14367$as_echo_n "checking for $ac_word... " >&6; }
14368if ${ac_cv_path_CYGPATH+:} false; then :
14369  $as_echo_n "(cached) " >&6
14370else
14371  case $CYGPATH in
14372  [\\/]* | ?:[\\/]*)
14373  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14374  ;;
14375  *)
14376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14377for as_dir in $PATH
14378do
14379  IFS=$as_save_IFS
14380  test -z "$as_dir" && as_dir=.
14381    for ac_exec_ext in '' $ac_executable_extensions; do
14382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14383    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14385    break 2
14386  fi
14387done
14388  done
14389IFS=$as_save_IFS
14390
14391  ;;
14392esac
14393fi
14394CYGPATH=$ac_cv_path_CYGPATH
14395if test -n "$CYGPATH"; then
14396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14397$as_echo "$CYGPATH" >&6; }
14398else
14399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14400$as_echo "no" >&6; }
14401fi
14402
14403
14404  test -n "$CYGPATH" && break
14405done
14406
14407    else
14408      # If it succeeded, then it was overridden by the user. We will use it
14409      # for the tool.
14410
14411      # First remove it from the list of overridden variables, so we can test
14412      # for unknown variables in the end.
14413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14414
14415      # Check if we try to supply an empty value
14416      if test "x$CYGPATH" = x; then
14417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14418$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14420$as_echo_n "checking for CYGPATH... " >&6; }
14421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14422$as_echo "disabled" >&6; }
14423      else
14424        # Check if the provided tool contains a complete path.
14425        tool_specified="$CYGPATH"
14426        tool_basename="${tool_specified##*/}"
14427        if test "x$tool_basename" = "x$tool_specified"; then
14428          # A command without a complete path is provided, search $PATH.
14429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14430$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14431          # Extract the first word of "$tool_basename", so it can be a program name with args.
14432set dummy $tool_basename; ac_word=$2
14433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14434$as_echo_n "checking for $ac_word... " >&6; }
14435if ${ac_cv_path_CYGPATH+:} false; then :
14436  $as_echo_n "(cached) " >&6
14437else
14438  case $CYGPATH in
14439  [\\/]* | ?:[\\/]*)
14440  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14441  ;;
14442  *)
14443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14444for as_dir in $PATH
14445do
14446  IFS=$as_save_IFS
14447  test -z "$as_dir" && as_dir=.
14448    for ac_exec_ext in '' $ac_executable_extensions; do
14449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14450    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14452    break 2
14453  fi
14454done
14455  done
14456IFS=$as_save_IFS
14457
14458  ;;
14459esac
14460fi
14461CYGPATH=$ac_cv_path_CYGPATH
14462if test -n "$CYGPATH"; then
14463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14464$as_echo "$CYGPATH" >&6; }
14465else
14466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14467$as_echo "no" >&6; }
14468fi
14469
14470
14471          if test "x$CYGPATH" = x; then
14472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14473          fi
14474        else
14475          # Otherwise we believe it is a complete path. Use it as it is.
14476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14477$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14479$as_echo_n "checking for CYGPATH... " >&6; }
14480          if test ! -x "$tool_specified"; then
14481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14482$as_echo "not found" >&6; }
14483            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14484          fi
14485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14486$as_echo "$tool_specified" >&6; }
14487        fi
14488      fi
14489    fi
14490
14491  fi
14492
14493
14494
14495
14496  # Publish this variable in the help.
14497
14498
14499  if [ -z "${READLINK+x}" ]; then
14500    # The variable is not set by user, try to locate tool using the code snippet
14501    for ac_prog in greadlink readlink
14502do
14503  # Extract the first word of "$ac_prog", so it can be a program name with args.
14504set dummy $ac_prog; ac_word=$2
14505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14506$as_echo_n "checking for $ac_word... " >&6; }
14507if ${ac_cv_path_READLINK+:} false; then :
14508  $as_echo_n "(cached) " >&6
14509else
14510  case $READLINK in
14511  [\\/]* | ?:[\\/]*)
14512  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14513  ;;
14514  *)
14515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14516for as_dir in $PATH
14517do
14518  IFS=$as_save_IFS
14519  test -z "$as_dir" && as_dir=.
14520    for ac_exec_ext in '' $ac_executable_extensions; do
14521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14522    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14524    break 2
14525  fi
14526done
14527  done
14528IFS=$as_save_IFS
14529
14530  ;;
14531esac
14532fi
14533READLINK=$ac_cv_path_READLINK
14534if test -n "$READLINK"; then
14535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14536$as_echo "$READLINK" >&6; }
14537else
14538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539$as_echo "no" >&6; }
14540fi
14541
14542
14543  test -n "$READLINK" && break
14544done
14545
14546  else
14547    # The variable is set, but is it from the command line or the environment?
14548
14549    # Try to remove the string !READLINK! from our list.
14550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14552      # If it failed, the variable was not from the command line. Ignore it,
14553      # but warn the user (except for BASH, which is always set by the calling BASH).
14554      if test "xREADLINK" != xBASH; then
14555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14556$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14557      fi
14558      # Try to locate tool using the code snippet
14559      for ac_prog in greadlink readlink
14560do
14561  # Extract the first word of "$ac_prog", so it can be a program name with args.
14562set dummy $ac_prog; ac_word=$2
14563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14564$as_echo_n "checking for $ac_word... " >&6; }
14565if ${ac_cv_path_READLINK+:} false; then :
14566  $as_echo_n "(cached) " >&6
14567else
14568  case $READLINK in
14569  [\\/]* | ?:[\\/]*)
14570  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14571  ;;
14572  *)
14573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14574for as_dir in $PATH
14575do
14576  IFS=$as_save_IFS
14577  test -z "$as_dir" && as_dir=.
14578    for ac_exec_ext in '' $ac_executable_extensions; do
14579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14580    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14582    break 2
14583  fi
14584done
14585  done
14586IFS=$as_save_IFS
14587
14588  ;;
14589esac
14590fi
14591READLINK=$ac_cv_path_READLINK
14592if test -n "$READLINK"; then
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14594$as_echo "$READLINK" >&6; }
14595else
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14597$as_echo "no" >&6; }
14598fi
14599
14600
14601  test -n "$READLINK" && break
14602done
14603
14604    else
14605      # If it succeeded, then it was overridden by the user. We will use it
14606      # for the tool.
14607
14608      # First remove it from the list of overridden variables, so we can test
14609      # for unknown variables in the end.
14610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14611
14612      # Check if we try to supply an empty value
14613      if test "x$READLINK" = x; then
14614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14615$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14617$as_echo_n "checking for READLINK... " >&6; }
14618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14619$as_echo "disabled" >&6; }
14620      else
14621        # Check if the provided tool contains a complete path.
14622        tool_specified="$READLINK"
14623        tool_basename="${tool_specified##*/}"
14624        if test "x$tool_basename" = "x$tool_specified"; then
14625          # A command without a complete path is provided, search $PATH.
14626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14627$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14628          # Extract the first word of "$tool_basename", so it can be a program name with args.
14629set dummy $tool_basename; ac_word=$2
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14631$as_echo_n "checking for $ac_word... " >&6; }
14632if ${ac_cv_path_READLINK+:} false; then :
14633  $as_echo_n "(cached) " >&6
14634else
14635  case $READLINK in
14636  [\\/]* | ?:[\\/]*)
14637  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14638  ;;
14639  *)
14640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14641for as_dir in $PATH
14642do
14643  IFS=$as_save_IFS
14644  test -z "$as_dir" && as_dir=.
14645    for ac_exec_ext in '' $ac_executable_extensions; do
14646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14647    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14649    break 2
14650  fi
14651done
14652  done
14653IFS=$as_save_IFS
14654
14655  ;;
14656esac
14657fi
14658READLINK=$ac_cv_path_READLINK
14659if test -n "$READLINK"; then
14660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14661$as_echo "$READLINK" >&6; }
14662else
14663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14664$as_echo "no" >&6; }
14665fi
14666
14667
14668          if test "x$READLINK" = x; then
14669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14670          fi
14671        else
14672          # Otherwise we believe it is a complete path. Use it as it is.
14673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14674$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14676$as_echo_n "checking for READLINK... " >&6; }
14677          if test ! -x "$tool_specified"; then
14678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14679$as_echo "not found" >&6; }
14680            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14681          fi
14682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14683$as_echo "$tool_specified" >&6; }
14684        fi
14685      fi
14686    fi
14687
14688  fi
14689
14690
14691
14692
14693  # Publish this variable in the help.
14694
14695
14696  if [ -z "${DF+x}" ]; then
14697    # The variable is not set by user, try to locate tool using the code snippet
14698    for ac_prog in df
14699do
14700  # Extract the first word of "$ac_prog", so it can be a program name with args.
14701set dummy $ac_prog; ac_word=$2
14702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14703$as_echo_n "checking for $ac_word... " >&6; }
14704if ${ac_cv_path_DF+:} false; then :
14705  $as_echo_n "(cached) " >&6
14706else
14707  case $DF in
14708  [\\/]* | ?:[\\/]*)
14709  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14710  ;;
14711  *)
14712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14713for as_dir in $PATH
14714do
14715  IFS=$as_save_IFS
14716  test -z "$as_dir" && as_dir=.
14717    for ac_exec_ext in '' $ac_executable_extensions; do
14718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14719    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14721    break 2
14722  fi
14723done
14724  done
14725IFS=$as_save_IFS
14726
14727  ;;
14728esac
14729fi
14730DF=$ac_cv_path_DF
14731if test -n "$DF"; then
14732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14733$as_echo "$DF" >&6; }
14734else
14735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14736$as_echo "no" >&6; }
14737fi
14738
14739
14740  test -n "$DF" && break
14741done
14742
14743  else
14744    # The variable is set, but is it from the command line or the environment?
14745
14746    # Try to remove the string !DF! from our list.
14747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14749      # If it failed, the variable was not from the command line. Ignore it,
14750      # but warn the user (except for BASH, which is always set by the calling BASH).
14751      if test "xDF" != xBASH; then
14752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14753$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14754      fi
14755      # Try to locate tool using the code snippet
14756      for ac_prog in df
14757do
14758  # Extract the first word of "$ac_prog", so it can be a program name with args.
14759set dummy $ac_prog; ac_word=$2
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14761$as_echo_n "checking for $ac_word... " >&6; }
14762if ${ac_cv_path_DF+:} false; then :
14763  $as_echo_n "(cached) " >&6
14764else
14765  case $DF in
14766  [\\/]* | ?:[\\/]*)
14767  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14768  ;;
14769  *)
14770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14771for as_dir in $PATH
14772do
14773  IFS=$as_save_IFS
14774  test -z "$as_dir" && as_dir=.
14775    for ac_exec_ext in '' $ac_executable_extensions; do
14776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14777    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14779    break 2
14780  fi
14781done
14782  done
14783IFS=$as_save_IFS
14784
14785  ;;
14786esac
14787fi
14788DF=$ac_cv_path_DF
14789if test -n "$DF"; then
14790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14791$as_echo "$DF" >&6; }
14792else
14793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14794$as_echo "no" >&6; }
14795fi
14796
14797
14798  test -n "$DF" && break
14799done
14800
14801    else
14802      # If it succeeded, then it was overridden by the user. We will use it
14803      # for the tool.
14804
14805      # First remove it from the list of overridden variables, so we can test
14806      # for unknown variables in the end.
14807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14808
14809      # Check if we try to supply an empty value
14810      if test "x$DF" = x; then
14811        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14812$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14814$as_echo_n "checking for DF... " >&6; }
14815        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14816$as_echo "disabled" >&6; }
14817      else
14818        # Check if the provided tool contains a complete path.
14819        tool_specified="$DF"
14820        tool_basename="${tool_specified##*/}"
14821        if test "x$tool_basename" = "x$tool_specified"; then
14822          # A command without a complete path is provided, search $PATH.
14823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14824$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14825          # Extract the first word of "$tool_basename", so it can be a program name with args.
14826set dummy $tool_basename; ac_word=$2
14827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14828$as_echo_n "checking for $ac_word... " >&6; }
14829if ${ac_cv_path_DF+:} false; then :
14830  $as_echo_n "(cached) " >&6
14831else
14832  case $DF in
14833  [\\/]* | ?:[\\/]*)
14834  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14835  ;;
14836  *)
14837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14838for as_dir in $PATH
14839do
14840  IFS=$as_save_IFS
14841  test -z "$as_dir" && as_dir=.
14842    for ac_exec_ext in '' $ac_executable_extensions; do
14843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14844    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14846    break 2
14847  fi
14848done
14849  done
14850IFS=$as_save_IFS
14851
14852  ;;
14853esac
14854fi
14855DF=$ac_cv_path_DF
14856if test -n "$DF"; then
14857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14858$as_echo "$DF" >&6; }
14859else
14860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14861$as_echo "no" >&6; }
14862fi
14863
14864
14865          if test "x$DF" = x; then
14866            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14867          fi
14868        else
14869          # Otherwise we believe it is a complete path. Use it as it is.
14870          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14871$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14872          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14873$as_echo_n "checking for DF... " >&6; }
14874          if test ! -x "$tool_specified"; then
14875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14876$as_echo "not found" >&6; }
14877            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14878          fi
14879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14880$as_echo "$tool_specified" >&6; }
14881        fi
14882      fi
14883    fi
14884
14885  fi
14886
14887
14888
14889
14890  # Publish this variable in the help.
14891
14892
14893  if [ -z "${CPIO+x}" ]; then
14894    # The variable is not set by user, try to locate tool using the code snippet
14895    for ac_prog in cpio bsdcpio
14896do
14897  # Extract the first word of "$ac_prog", so it can be a program name with args.
14898set dummy $ac_prog; ac_word=$2
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14900$as_echo_n "checking for $ac_word... " >&6; }
14901if ${ac_cv_path_CPIO+:} false; then :
14902  $as_echo_n "(cached) " >&6
14903else
14904  case $CPIO in
14905  [\\/]* | ?:[\\/]*)
14906  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14907  ;;
14908  *)
14909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14910for as_dir in $PATH
14911do
14912  IFS=$as_save_IFS
14913  test -z "$as_dir" && as_dir=.
14914    for ac_exec_ext in '' $ac_executable_extensions; do
14915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14916    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14918    break 2
14919  fi
14920done
14921  done
14922IFS=$as_save_IFS
14923
14924  ;;
14925esac
14926fi
14927CPIO=$ac_cv_path_CPIO
14928if test -n "$CPIO"; then
14929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14930$as_echo "$CPIO" >&6; }
14931else
14932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14933$as_echo "no" >&6; }
14934fi
14935
14936
14937  test -n "$CPIO" && break
14938done
14939
14940  else
14941    # The variable is set, but is it from the command line or the environment?
14942
14943    # Try to remove the string !CPIO! from our list.
14944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14946      # If it failed, the variable was not from the command line. Ignore it,
14947      # but warn the user (except for BASH, which is always set by the calling BASH).
14948      if test "xCPIO" != xBASH; then
14949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14950$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14951      fi
14952      # Try to locate tool using the code snippet
14953      for ac_prog in cpio bsdcpio
14954do
14955  # Extract the first word of "$ac_prog", so it can be a program name with args.
14956set dummy $ac_prog; ac_word=$2
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14958$as_echo_n "checking for $ac_word... " >&6; }
14959if ${ac_cv_path_CPIO+:} false; then :
14960  $as_echo_n "(cached) " >&6
14961else
14962  case $CPIO in
14963  [\\/]* | ?:[\\/]*)
14964  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14965  ;;
14966  *)
14967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14968for as_dir in $PATH
14969do
14970  IFS=$as_save_IFS
14971  test -z "$as_dir" && as_dir=.
14972    for ac_exec_ext in '' $ac_executable_extensions; do
14973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14974    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14976    break 2
14977  fi
14978done
14979  done
14980IFS=$as_save_IFS
14981
14982  ;;
14983esac
14984fi
14985CPIO=$ac_cv_path_CPIO
14986if test -n "$CPIO"; then
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14988$as_echo "$CPIO" >&6; }
14989else
14990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14991$as_echo "no" >&6; }
14992fi
14993
14994
14995  test -n "$CPIO" && break
14996done
14997
14998    else
14999      # If it succeeded, then it was overridden by the user. We will use it
15000      # for the tool.
15001
15002      # First remove it from the list of overridden variables, so we can test
15003      # for unknown variables in the end.
15004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15005
15006      # Check if we try to supply an empty value
15007      if test "x$CPIO" = x; then
15008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15009$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15011$as_echo_n "checking for CPIO... " >&6; }
15012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15013$as_echo "disabled" >&6; }
15014      else
15015        # Check if the provided tool contains a complete path.
15016        tool_specified="$CPIO"
15017        tool_basename="${tool_specified##*/}"
15018        if test "x$tool_basename" = "x$tool_specified"; then
15019          # A command without a complete path is provided, search $PATH.
15020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15021$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15022          # Extract the first word of "$tool_basename", so it can be a program name with args.
15023set dummy $tool_basename; ac_word=$2
15024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15025$as_echo_n "checking for $ac_word... " >&6; }
15026if ${ac_cv_path_CPIO+:} false; then :
15027  $as_echo_n "(cached) " >&6
15028else
15029  case $CPIO in
15030  [\\/]* | ?:[\\/]*)
15031  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15032  ;;
15033  *)
15034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15035for as_dir in $PATH
15036do
15037  IFS=$as_save_IFS
15038  test -z "$as_dir" && as_dir=.
15039    for ac_exec_ext in '' $ac_executable_extensions; do
15040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15041    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15043    break 2
15044  fi
15045done
15046  done
15047IFS=$as_save_IFS
15048
15049  ;;
15050esac
15051fi
15052CPIO=$ac_cv_path_CPIO
15053if test -n "$CPIO"; then
15054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15055$as_echo "$CPIO" >&6; }
15056else
15057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15058$as_echo "no" >&6; }
15059fi
15060
15061
15062          if test "x$CPIO" = x; then
15063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15064          fi
15065        else
15066          # Otherwise we believe it is a complete path. Use it as it is.
15067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15068$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15070$as_echo_n "checking for CPIO... " >&6; }
15071          if test ! -x "$tool_specified"; then
15072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15073$as_echo "not found" >&6; }
15074            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15075          fi
15076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15077$as_echo "$tool_specified" >&6; }
15078        fi
15079      fi
15080    fi
15081
15082  fi
15083
15084
15085
15086
15087  # Publish this variable in the help.
15088
15089
15090  if [ -z "${NICE+x}" ]; then
15091    # The variable is not set by user, try to locate tool using the code snippet
15092    for ac_prog in nice
15093do
15094  # Extract the first word of "$ac_prog", so it can be a program name with args.
15095set dummy $ac_prog; ac_word=$2
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15097$as_echo_n "checking for $ac_word... " >&6; }
15098if ${ac_cv_path_NICE+:} false; then :
15099  $as_echo_n "(cached) " >&6
15100else
15101  case $NICE in
15102  [\\/]* | ?:[\\/]*)
15103  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15104  ;;
15105  *)
15106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15107for as_dir in $PATH
15108do
15109  IFS=$as_save_IFS
15110  test -z "$as_dir" && as_dir=.
15111    for ac_exec_ext in '' $ac_executable_extensions; do
15112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15113    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15115    break 2
15116  fi
15117done
15118  done
15119IFS=$as_save_IFS
15120
15121  ;;
15122esac
15123fi
15124NICE=$ac_cv_path_NICE
15125if test -n "$NICE"; then
15126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15127$as_echo "$NICE" >&6; }
15128else
15129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130$as_echo "no" >&6; }
15131fi
15132
15133
15134  test -n "$NICE" && break
15135done
15136
15137  else
15138    # The variable is set, but is it from the command line or the environment?
15139
15140    # Try to remove the string !NICE! from our list.
15141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15143      # If it failed, the variable was not from the command line. Ignore it,
15144      # but warn the user (except for BASH, which is always set by the calling BASH).
15145      if test "xNICE" != xBASH; then
15146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15147$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15148      fi
15149      # Try to locate tool using the code snippet
15150      for ac_prog in nice
15151do
15152  # Extract the first word of "$ac_prog", so it can be a program name with args.
15153set dummy $ac_prog; ac_word=$2
15154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15155$as_echo_n "checking for $ac_word... " >&6; }
15156if ${ac_cv_path_NICE+:} false; then :
15157  $as_echo_n "(cached) " >&6
15158else
15159  case $NICE in
15160  [\\/]* | ?:[\\/]*)
15161  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15162  ;;
15163  *)
15164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15165for as_dir in $PATH
15166do
15167  IFS=$as_save_IFS
15168  test -z "$as_dir" && as_dir=.
15169    for ac_exec_ext in '' $ac_executable_extensions; do
15170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15171    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15173    break 2
15174  fi
15175done
15176  done
15177IFS=$as_save_IFS
15178
15179  ;;
15180esac
15181fi
15182NICE=$ac_cv_path_NICE
15183if test -n "$NICE"; then
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15185$as_echo "$NICE" >&6; }
15186else
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15188$as_echo "no" >&6; }
15189fi
15190
15191
15192  test -n "$NICE" && break
15193done
15194
15195    else
15196      # If it succeeded, then it was overridden by the user. We will use it
15197      # for the tool.
15198
15199      # First remove it from the list of overridden variables, so we can test
15200      # for unknown variables in the end.
15201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15202
15203      # Check if we try to supply an empty value
15204      if test "x$NICE" = x; then
15205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15206$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15208$as_echo_n "checking for NICE... " >&6; }
15209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15210$as_echo "disabled" >&6; }
15211      else
15212        # Check if the provided tool contains a complete path.
15213        tool_specified="$NICE"
15214        tool_basename="${tool_specified##*/}"
15215        if test "x$tool_basename" = "x$tool_specified"; then
15216          # A command without a complete path is provided, search $PATH.
15217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15218$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15219          # Extract the first word of "$tool_basename", so it can be a program name with args.
15220set dummy $tool_basename; ac_word=$2
15221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15222$as_echo_n "checking for $ac_word... " >&6; }
15223if ${ac_cv_path_NICE+:} false; then :
15224  $as_echo_n "(cached) " >&6
15225else
15226  case $NICE in
15227  [\\/]* | ?:[\\/]*)
15228  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15229  ;;
15230  *)
15231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15232for as_dir in $PATH
15233do
15234  IFS=$as_save_IFS
15235  test -z "$as_dir" && as_dir=.
15236    for ac_exec_ext in '' $ac_executable_extensions; do
15237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15238    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15240    break 2
15241  fi
15242done
15243  done
15244IFS=$as_save_IFS
15245
15246  ;;
15247esac
15248fi
15249NICE=$ac_cv_path_NICE
15250if test -n "$NICE"; then
15251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15252$as_echo "$NICE" >&6; }
15253else
15254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15255$as_echo "no" >&6; }
15256fi
15257
15258
15259          if test "x$NICE" = x; then
15260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15261          fi
15262        else
15263          # Otherwise we believe it is a complete path. Use it as it is.
15264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15265$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15267$as_echo_n "checking for NICE... " >&6; }
15268          if test ! -x "$tool_specified"; then
15269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15270$as_echo "not found" >&6; }
15271            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15272          fi
15273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15274$as_echo "$tool_specified" >&6; }
15275        fi
15276      fi
15277    fi
15278
15279  fi
15280
15281
15282
15283
15284# Now we can determine OpenJDK build and target platforms. This is required to
15285# have early on.
15286# Make sure we can run config.sub.
15287$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15288  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15289
15290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15291$as_echo_n "checking build system type... " >&6; }
15292if ${ac_cv_build+:} false; then :
15293  $as_echo_n "(cached) " >&6
15294else
15295  ac_build_alias=$build_alias
15296test "x$ac_build_alias" = x &&
15297  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15298test "x$ac_build_alias" = x &&
15299  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15300ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15301  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15302
15303fi
15304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15305$as_echo "$ac_cv_build" >&6; }
15306case $ac_cv_build in
15307*-*-*) ;;
15308*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15309esac
15310build=$ac_cv_build
15311ac_save_IFS=$IFS; IFS='-'
15312set x $ac_cv_build
15313shift
15314build_cpu=$1
15315build_vendor=$2
15316shift; shift
15317# Remember, the first character of IFS is used to create $*,
15318# except with old shells:
15319build_os=$*
15320IFS=$ac_save_IFS
15321case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15322
15323
15324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15325$as_echo_n "checking host system type... " >&6; }
15326if ${ac_cv_host+:} false; then :
15327  $as_echo_n "(cached) " >&6
15328else
15329  if test "x$host_alias" = x; then
15330  ac_cv_host=$ac_cv_build
15331else
15332  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15333    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15334fi
15335
15336fi
15337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15338$as_echo "$ac_cv_host" >&6; }
15339case $ac_cv_host in
15340*-*-*) ;;
15341*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15342esac
15343host=$ac_cv_host
15344ac_save_IFS=$IFS; IFS='-'
15345set x $ac_cv_host
15346shift
15347host_cpu=$1
15348host_vendor=$2
15349shift; shift
15350# Remember, the first character of IFS is used to create $*,
15351# except with old shells:
15352host_os=$*
15353IFS=$ac_save_IFS
15354case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15355
15356
15357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15358$as_echo_n "checking target system type... " >&6; }
15359if ${ac_cv_target+:} false; then :
15360  $as_echo_n "(cached) " >&6
15361else
15362  if test "x$target_alias" = x; then
15363  ac_cv_target=$ac_cv_host
15364else
15365  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15366    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15367fi
15368
15369fi
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15371$as_echo "$ac_cv_target" >&6; }
15372case $ac_cv_target in
15373*-*-*) ;;
15374*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15375esac
15376target=$ac_cv_target
15377ac_save_IFS=$IFS; IFS='-'
15378set x $ac_cv_target
15379shift
15380target_cpu=$1
15381target_vendor=$2
15382shift; shift
15383# Remember, the first character of IFS is used to create $*,
15384# except with old shells:
15385target_os=$*
15386IFS=$ac_save_IFS
15387case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15388
15389
15390# The aliases save the names the user supplied, while $host etc.
15391# will get canonicalized.
15392test -n "$target_alias" &&
15393  test "$program_prefix$program_suffix$program_transform_name" = \
15394    NONENONEs,x,x, &&
15395  program_prefix=${target_alias}-
15396
15397  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15398  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15399  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15400  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15401  # to use the configure naming style.
15402
15403
15404
15405
15406
15407  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15408  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15409  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15410  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15411  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15412  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15413
15414
15415
15416  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15417
15418  case "$build_os" in
15419    *linux*)
15420      VAR_OS=linux
15421      VAR_OS_TYPE=unix
15422      ;;
15423    *solaris*)
15424      VAR_OS=solaris
15425      VAR_OS_TYPE=unix
15426      ;;
15427    *darwin*)
15428      VAR_OS=macosx
15429      VAR_OS_TYPE=unix
15430      ;;
15431    *bsd*)
15432      VAR_OS=bsd
15433      VAR_OS_TYPE=unix
15434      ;;
15435    *cygwin*)
15436      VAR_OS=windows
15437      VAR_OS_ENV=windows.cygwin
15438      ;;
15439    *mingw*)
15440      VAR_OS=windows
15441      VAR_OS_ENV=windows.msys
15442      ;;
15443    *aix*)
15444      VAR_OS=aix
15445      VAR_OS_TYPE=unix
15446      ;;
15447    *)
15448      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15449      ;;
15450  esac
15451
15452
15453  # First argument is the cpu name from the trip/quad
15454  case "$build_cpu" in
15455    x86_64)
15456      VAR_CPU=x86_64
15457      VAR_CPU_ARCH=x86
15458      VAR_CPU_BITS=64
15459      VAR_CPU_ENDIAN=little
15460      ;;
15461    i?86)
15462      VAR_CPU=x86
15463      VAR_CPU_ARCH=x86
15464      VAR_CPU_BITS=32
15465      VAR_CPU_ENDIAN=little
15466      ;;
15467    arm*)
15468      VAR_CPU=arm
15469      VAR_CPU_ARCH=arm
15470      VAR_CPU_BITS=32
15471      VAR_CPU_ENDIAN=little
15472      ;;
15473    aarch64)
15474      VAR_CPU=aarch64
15475      VAR_CPU_ARCH=aarch64
15476      VAR_CPU_BITS=64
15477      VAR_CPU_ENDIAN=little
15478      ;;
15479    powerpc)
15480      VAR_CPU=ppc
15481      VAR_CPU_ARCH=ppc
15482      VAR_CPU_BITS=32
15483      VAR_CPU_ENDIAN=big
15484      ;;
15485    powerpc64)
15486      VAR_CPU=ppc64
15487      VAR_CPU_ARCH=ppc
15488      VAR_CPU_BITS=64
15489      VAR_CPU_ENDIAN=big
15490      ;;
15491    powerpc64le)
15492      VAR_CPU=ppc64le
15493      VAR_CPU_ARCH=ppc
15494      VAR_CPU_BITS=64
15495      VAR_CPU_ENDIAN=little
15496      ;;
15497    s390)
15498      VAR_CPU=s390
15499      VAR_CPU_ARCH=s390
15500      VAR_CPU_BITS=32
15501      VAR_CPU_ENDIAN=big
15502      ;;
15503    s390x)
15504      VAR_CPU=s390x
15505      VAR_CPU_ARCH=s390
15506      VAR_CPU_BITS=64
15507      VAR_CPU_ENDIAN=big
15508      ;;
15509    sparc)
15510      VAR_CPU=sparc
15511      VAR_CPU_ARCH=sparc
15512      VAR_CPU_BITS=32
15513      VAR_CPU_ENDIAN=big
15514      ;;
15515    sparcv9|sparc64)
15516      VAR_CPU=sparcv9
15517      VAR_CPU_ARCH=sparc
15518      VAR_CPU_BITS=64
15519      VAR_CPU_ENDIAN=big
15520      ;;
15521    *)
15522      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15523      ;;
15524  esac
15525
15526  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15527  OPENJDK_BUILD_OS="$VAR_OS"
15528  if test "x$VAR_OS_TYPE" != x; then
15529    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15530  else
15531    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15532  fi
15533  if test "x$VAR_OS_ENV" != x; then
15534    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15535  else
15536    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15537  fi
15538  OPENJDK_BUILD_CPU="$VAR_CPU"
15539  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15540  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15541  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15542
15543
15544
15545
15546
15547
15548
15549
15550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15551$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15553$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15554
15555  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15556
15557  case "$host_os" in
15558    *linux*)
15559      VAR_OS=linux
15560      VAR_OS_TYPE=unix
15561      ;;
15562    *solaris*)
15563      VAR_OS=solaris
15564      VAR_OS_TYPE=unix
15565      ;;
15566    *darwin*)
15567      VAR_OS=macosx
15568      VAR_OS_TYPE=unix
15569      ;;
15570    *bsd*)
15571      VAR_OS=bsd
15572      VAR_OS_TYPE=unix
15573      ;;
15574    *cygwin*)
15575      VAR_OS=windows
15576      VAR_OS_ENV=windows.cygwin
15577      ;;
15578    *mingw*)
15579      VAR_OS=windows
15580      VAR_OS_ENV=windows.msys
15581      ;;
15582    *aix*)
15583      VAR_OS=aix
15584      VAR_OS_TYPE=unix
15585      ;;
15586    *)
15587      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15588      ;;
15589  esac
15590
15591
15592  # First argument is the cpu name from the trip/quad
15593  case "$host_cpu" in
15594    x86_64)
15595      VAR_CPU=x86_64
15596      VAR_CPU_ARCH=x86
15597      VAR_CPU_BITS=64
15598      VAR_CPU_ENDIAN=little
15599      ;;
15600    i?86)
15601      VAR_CPU=x86
15602      VAR_CPU_ARCH=x86
15603      VAR_CPU_BITS=32
15604      VAR_CPU_ENDIAN=little
15605      ;;
15606    arm*)
15607      VAR_CPU=arm
15608      VAR_CPU_ARCH=arm
15609      VAR_CPU_BITS=32
15610      VAR_CPU_ENDIAN=little
15611      ;;
15612    aarch64)
15613      VAR_CPU=aarch64
15614      VAR_CPU_ARCH=aarch64
15615      VAR_CPU_BITS=64
15616      VAR_CPU_ENDIAN=little
15617      ;;
15618    powerpc)
15619      VAR_CPU=ppc
15620      VAR_CPU_ARCH=ppc
15621      VAR_CPU_BITS=32
15622      VAR_CPU_ENDIAN=big
15623      ;;
15624    powerpc64)
15625      VAR_CPU=ppc64
15626      VAR_CPU_ARCH=ppc
15627      VAR_CPU_BITS=64
15628      VAR_CPU_ENDIAN=big
15629      ;;
15630    powerpc64le)
15631      VAR_CPU=ppc64le
15632      VAR_CPU_ARCH=ppc
15633      VAR_CPU_BITS=64
15634      VAR_CPU_ENDIAN=little
15635      ;;
15636    s390)
15637      VAR_CPU=s390
15638      VAR_CPU_ARCH=s390
15639      VAR_CPU_BITS=32
15640      VAR_CPU_ENDIAN=big
15641      ;;
15642    s390x)
15643      VAR_CPU=s390x
15644      VAR_CPU_ARCH=s390
15645      VAR_CPU_BITS=64
15646      VAR_CPU_ENDIAN=big
15647      ;;
15648    sparc)
15649      VAR_CPU=sparc
15650      VAR_CPU_ARCH=sparc
15651      VAR_CPU_BITS=32
15652      VAR_CPU_ENDIAN=big
15653      ;;
15654    sparcv9|sparc64)
15655      VAR_CPU=sparcv9
15656      VAR_CPU_ARCH=sparc
15657      VAR_CPU_BITS=64
15658      VAR_CPU_ENDIAN=big
15659      ;;
15660    *)
15661      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15662      ;;
15663  esac
15664
15665  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15666  OPENJDK_TARGET_OS="$VAR_OS"
15667  if test "x$VAR_OS_TYPE" != x; then
15668    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15669  else
15670    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15671  fi
15672  if test "x$VAR_OS_ENV" != x; then
15673    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15674  else
15675    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15676  fi
15677  OPENJDK_TARGET_CPU="$VAR_CPU"
15678  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15679  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15680  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15681
15682
15683
15684
15685
15686
15687
15688
15689  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15690$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15692$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15693
15694
15695
15696# Check whether --with-target-bits was given.
15697if test "${with_target_bits+set}" = set; then :
15698  withval=$with_target_bits;
15699fi
15700
15701
15702  # We have three types of compiles:
15703  # native  == normal compilation, target system == build system
15704  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15705  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15706  #
15707  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15708    # We're doing a proper cross-compilation
15709    COMPILE_TYPE="cross"
15710  else
15711    COMPILE_TYPE="native"
15712  fi
15713
15714  if test "x$with_target_bits" != x; then
15715    if test "x$COMPILE_TYPE" = "xcross"; then
15716      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15717    fi
15718
15719    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15720      # A reduced build is requested
15721      COMPILE_TYPE="reduced"
15722      OPENJDK_TARGET_CPU_BITS=32
15723      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15724        OPENJDK_TARGET_CPU=x86
15725      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15726        OPENJDK_TARGET_CPU=sparc
15727      else
15728        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15729      fi
15730    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15731      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
15732    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15734$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15735    else
15736      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15737    fi
15738  fi
15739
15740
15741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15742$as_echo_n "checking compilation type... " >&6; }
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15744$as_echo "$COMPILE_TYPE" >&6; }
15745
15746
15747  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15748    REQUIRED_OS_NAME=SunOS
15749    REQUIRED_OS_VERSION=5.10
15750  fi
15751  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15752    REQUIRED_OS_NAME=Linux
15753    REQUIRED_OS_VERSION=2.6
15754  fi
15755  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15756    REQUIRED_OS_NAME=Windows
15757    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15758      REQUIRED_OS_VERSION=5.2
15759    else
15760      REQUIRED_OS_VERSION=5.1
15761    fi
15762  fi
15763  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15764    REQUIRED_OS_NAME=Darwin
15765    REQUIRED_OS_VERSION=11.2
15766  fi
15767  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15768    REQUIRED_OS_NAME=AIX
15769    REQUIRED_OS_VERSION=7.1
15770  fi
15771
15772
15773
15774
15775
15776
15777  # Also store the legacy naming of the cpu.
15778  # Ie i586 and amd64 instead of x86 and x86_64
15779  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15780  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15781    OPENJDK_TARGET_CPU_LEGACY="i586"
15782  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15783    # On all platforms except MacOSX replace x86_64 with amd64.
15784    OPENJDK_TARGET_CPU_LEGACY="amd64"
15785  fi
15786
15787
15788  # And the second legacy naming of the cpu.
15789  # Ie i386 and amd64 instead of x86 and x86_64.
15790  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15791  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15792    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15793  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15794    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15795  fi
15796
15797
15798  # This is the name of the cpu (but using i386 and amd64 instead of
15799  # x86 and x86_64, respectively), preceeded by a /, to be used when
15800  # locating libraries. On macosx, it's empty, though.
15801  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15803    OPENJDK_TARGET_CPU_LIBDIR=""
15804  fi
15805
15806
15807  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15808  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15809  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15810  OPENJDK_TARGET_CPU_ISADIR=""
15811  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15812    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15813      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15814    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15815      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15816    fi
15817  fi
15818
15819
15820  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15821  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15822  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15823    # On linux only, we replace x86 with i386.
15824    OPENJDK_TARGET_CPU_OSARCH="i386"
15825  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15826    # On all platforms except macosx, we replace x86_64 with amd64.
15827    OPENJDK_TARGET_CPU_OSARCH="amd64"
15828  fi
15829
15830
15831  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15832  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15833    OPENJDK_TARGET_CPU_JLI="i386"
15834  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15835    # On all platforms except macosx, we replace x86_64 with amd64.
15836    OPENJDK_TARGET_CPU_JLI="amd64"
15837  fi
15838  # Now setup the -D flags for building libjli.
15839  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15840  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15841    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15842      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15843    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15844      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15845    fi
15846  fi
15847
15848
15849  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15850      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15851  else
15852      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15853  fi
15854
15855
15856  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15857  # Macosx is osx and x86_64 is x64
15858  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15859    OPENJDK_TARGET_OS_BUNDLE="osx"
15860  else
15861    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15862  fi
15863  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15864    OPENJDK_TARGET_CPU_BUNDLE="x64"
15865  else
15866    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15867  fi
15868  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15869
15870
15871
15872
15873  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15874    A_LP64="LP64:="
15875    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15876    # unpack200.exe
15877    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15878      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15879    fi
15880  fi
15881  LP64=$A_LP64
15882
15883
15884  if test "x$COMPILE_TYPE" = "xcross"; then
15885    # FIXME: ... or should this include reduced builds..?
15886    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15887  else
15888    DEFINE_CROSS_COMPILE_ARCH=""
15889  fi
15890
15891
15892  # Convert openjdk platform names to hotspot names
15893
15894  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15895  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15896    HOTSPOT_TARGET_OS=bsd
15897  fi
15898
15899
15900  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15901  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15902    HOTSPOT_TARGET_OS_TYPE=posix
15903  fi
15904
15905
15906  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15907  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15908    HOTSPOT_TARGET_CPU=x86_32
15909  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15910    HOTSPOT_TARGET_CPU=sparc
15911  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15912    HOTSPOT_TARGET_CPU=ppc_64
15913  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15914    HOTSPOT_TARGET_CPU=ppc_64
15915  fi
15916
15917
15918  # This is identical with OPENJDK_*, but define anyway for consistency.
15919  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15920
15921
15922  # Setup HOTSPOT_TARGET_CPU_DEFINE
15923  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15924    HOTSPOT_TARGET_CPU_DEFINE=IA32
15925  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15926    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15927  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15928    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15929  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15930    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15931  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15932    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15933  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15934    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935
15936  # The cpu defines below are for zero, we don't support them directly.
15937  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15938    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15939  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15940    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15941  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15942    HOTSPOT_TARGET_CPU_DEFINE=S390
15943  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15944    HOTSPOT_TARGET_CPU_DEFINE=S390
15945  elif test "x$OPENJDK_TARGET_CPU" != x; then
15946    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
15947  fi
15948
15949
15950
15951
15952  # Also store the legacy naming of the cpu.
15953  # Ie i586 and amd64 instead of x86 and x86_64
15954  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956    OPENJDK_BUILD_CPU_LEGACY="i586"
15957  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958    # On all platforms except MacOSX replace x86_64 with amd64.
15959    OPENJDK_BUILD_CPU_LEGACY="amd64"
15960  fi
15961
15962
15963  # And the second legacy naming of the cpu.
15964  # Ie i386 and amd64 instead of x86 and x86_64.
15965  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970  fi
15971
15972
15973  # This is the name of the cpu (but using i386 and amd64 instead of
15974  # x86 and x86_64, respectively), preceeded by a /, to be used when
15975  # locating libraries. On macosx, it's empty, though.
15976  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978    OPENJDK_BUILD_CPU_LIBDIR=""
15979  fi
15980
15981
15982  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985  OPENJDK_BUILD_CPU_ISADIR=""
15986  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991    fi
15992  fi
15993
15994
15995  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998    # On linux only, we replace x86 with i386.
15999    OPENJDK_BUILD_CPU_OSARCH="i386"
16000  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001    # On all platforms except macosx, we replace x86_64 with amd64.
16002    OPENJDK_BUILD_CPU_OSARCH="amd64"
16003  fi
16004
16005
16006  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008    OPENJDK_BUILD_CPU_JLI="i386"
16009  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010    # On all platforms except macosx, we replace x86_64 with amd64.
16011    OPENJDK_BUILD_CPU_JLI="amd64"
16012  fi
16013  # Now setup the -D flags for building libjli.
16014  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020    fi
16021  fi
16022
16023
16024  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026  else
16027      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028  fi
16029
16030
16031  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032  # Macosx is osx and x86_64 is x64
16033  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034    OPENJDK_BUILD_OS_BUNDLE="osx"
16035  else
16036    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037  fi
16038  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039    OPENJDK_BUILD_CPU_BUNDLE="x64"
16040  else
16041    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042  fi
16043  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044
16045
16046
16047
16048  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049    A_LP64="LP64:="
16050    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051    # unpack200.exe
16052    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054    fi
16055  fi
16056  LP64=$A_LP64
16057
16058
16059  if test "x$COMPILE_TYPE" = "xcross"; then
16060    # FIXME: ... or should this include reduced builds..?
16061    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062  else
16063    DEFINE_CROSS_COMPILE_ARCH=""
16064  fi
16065
16066
16067  # Convert openjdk platform names to hotspot names
16068
16069  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071    HOTSPOT_BUILD_OS=bsd
16072  fi
16073
16074
16075  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077    HOTSPOT_BUILD_OS_TYPE=posix
16078  fi
16079
16080
16081  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083    HOTSPOT_BUILD_CPU=x86_32
16084  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085    HOTSPOT_BUILD_CPU=sparc
16086  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087    HOTSPOT_BUILD_CPU=ppc_64
16088  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089    HOTSPOT_BUILD_CPU=ppc_64
16090  fi
16091
16092
16093  # This is identical with OPENJDK_*, but define anyway for consistency.
16094  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095
16096
16097  # Setup HOTSPOT_BUILD_CPU_DEFINE
16098  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099    HOTSPOT_BUILD_CPU_DEFINE=IA32
16100  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110
16111  # The cpu defines below are for zero, we don't support them directly.
16112  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117    HOTSPOT_BUILD_CPU_DEFINE=S390
16118  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119    HOTSPOT_BUILD_CPU_DEFINE=S390
16120  elif test "x$OPENJDK_BUILD_CPU" != x; then
16121    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16122  fi
16123
16124
16125
16126
16127  # ZERO_ARCHDEF is used to enable architecture-specific code.
16128  # This is used in legacy hotspot build.
16129  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16130
16131
16132
16133
16134
16135# Continue setting up basic stuff. Most remaining code require fundamental tools.
16136
16137  # Save the current directory this script was started from
16138  CURDIR="$PWD"
16139
16140  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16141  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16142  # was not available at that time.
16143  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16144  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16145    ORIGINAL_PATH="$REWRITTEN_PATH"
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16147$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16148  fi
16149
16150  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16151    PATH_SEP=";"
16152
16153  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16154  if test $SRC_ROOT_LENGTH -gt 100; then
16155    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16156  fi
16157
16158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16160$as_echo_n "checking cygwin release... " >&6; }
16161    CYGWIN_VERSION=`$UNAME -r`
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16163$as_echo "$CYGWIN_VERSION" >&6; }
16164    WINDOWS_ENV_VENDOR='cygwin'
16165    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16166
16167    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16168    if test "x$CYGWIN_VERSION_OLD" != x; then
16169      { $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
16170$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;}
16171      as_fn_error $? "Cannot continue" "$LINENO" 5
16172    fi
16173    if test "x$CYGPATH" = x; then
16174      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16175    fi
16176    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16177$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16178    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16179    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16180    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16181    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16183$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16184    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16185    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16186    if test "x$test_cygdrive_prefix" = x; then
16187      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16188    fi
16189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16191$as_echo_n "checking msys release... " >&6; }
16192    MSYS_VERSION=`$UNAME -r`
16193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16194$as_echo "$MSYS_VERSION" >&6; }
16195
16196    WINDOWS_ENV_VENDOR='msys'
16197    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16198
16199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16200$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16201    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16202    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16203
16204  windows_path="$MSYS_ROOT_PATH"
16205  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16206    unix_path=`$CYGPATH -u "$windows_path"`
16207    MSYS_ROOT_PATH="$unix_path"
16208  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16209    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16210    MSYS_ROOT_PATH="$unix_path"
16211  fi
16212
16213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16214$as_echo "$MSYS_ROOT_PATH" >&6; }
16215    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16216  else
16217    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16218  fi
16219
16220  # Test if windows or unix (cygwin/msys) find is first in path.
16221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16222$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16223  FIND_BINARY_OUTPUT=`find --version 2>&1`
16224  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16226$as_echo "unix style" >&6; }
16227  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16229$as_echo "Windows" >&6; }
16230    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16231$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16232    { $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
16233$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16234    as_fn_error $? "Cannot continue" "$LINENO" 5
16235  else
16236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16237$as_echo "unknown" >&6; }
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16239$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16240  fi
16241
16242  else
16243    PATH_SEP=":"
16244  fi
16245
16246
16247  # We get the top-level directory from the supporting wrappers.
16248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16249$as_echo_n "checking for top-level directory... " >&6; }
16250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16251$as_echo "$TOPDIR" >&6; }
16252
16253
16254  # Save the original version of TOPDIR for string comparisons
16255  ORIGINAL_TOPDIR="$TOPDIR"
16256
16257
16258  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16259
16260  # Only process if variable expands to non-empty
16261
16262  if test "x$CURDIR" != x; then
16263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16264
16265  # Input might be given as Windows format, start by converting to
16266  # unix format.
16267  path="$CURDIR"
16268  new_path=`$CYGPATH -u "$path"`
16269
16270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16273  # "foo.exe" is OK but "foo" is an error.
16274  #
16275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16276  # It is also a way to make sure we got the proper file name for the real test later on.
16277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16278  if test "x$test_shortpath" = x; then
16279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16280$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16281    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16282  fi
16283
16284  # Call helper function which possibly converts this using DOS-style short mode.
16285  # If so, the updated path is stored in $new_path.
16286
16287  input_path="$new_path"
16288  # Check if we need to convert this using DOS-style short mode. If the path
16289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16290  # take no chances and rewrite it.
16291  # Note: m4 eats our [], so we need to use [ and ] instead.
16292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16293  if test "x$has_forbidden_chars" != x; then
16294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16298      # Going to short mode and back again did indeed matter. Since short mode is
16299      # case insensitive, let's make it lowercase to improve readability.
16300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16301      # Now convert it back to Unix-style (cygpath)
16302      input_path=`$CYGPATH -u "$shortmode_path"`
16303      new_path="$input_path"
16304    fi
16305  fi
16306
16307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16308  if test "x$test_cygdrive_prefix" = x; then
16309    # As a simple fix, exclude /usr/bin since it's not a real path.
16310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16312      # a path prefixed by /cygdrive for fixpath to work.
16313      new_path="$CYGWIN_ROOT_PATH$input_path"
16314    fi
16315  fi
16316
16317
16318  if test "x$path" != "x$new_path"; then
16319    CURDIR="$new_path"
16320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16321$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16322  fi
16323
16324    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16325
16326  path="$CURDIR"
16327  has_colon=`$ECHO $path | $GREP ^.:`
16328  new_path="$path"
16329  if test "x$has_colon" = x; then
16330    # Not in mixed or Windows style, start by that.
16331    new_path=`cmd //c echo $path`
16332  fi
16333
16334
16335  input_path="$new_path"
16336  # Check if we need to convert this using DOS-style short mode. If the path
16337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16338  # take no chances and rewrite it.
16339  # Note: m4 eats our [], so we need to use [ and ] instead.
16340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16341  if test "x$has_forbidden_chars" != x; then
16342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16344  fi
16345
16346
16347  windows_path="$new_path"
16348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16349    unix_path=`$CYGPATH -u "$windows_path"`
16350    new_path="$unix_path"
16351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16353    new_path="$unix_path"
16354  fi
16355
16356  if test "x$path" != "x$new_path"; then
16357    CURDIR="$new_path"
16358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16359$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16360  fi
16361
16362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16364
16365    else
16366      # We're on a unix platform. Hooray! :)
16367      path="$CURDIR"
16368      has_space=`$ECHO "$path" | $GREP " "`
16369      if test "x$has_space" != x; then
16370        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16371$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16372        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16373      fi
16374
16375      # Use eval to expand a potential ~
16376      eval path="$path"
16377      if test ! -f "$path" && test ! -d "$path"; then
16378        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16379      fi
16380
16381      if test -d "$path"; then
16382        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16383      else
16384        dir="`$DIRNAME "$path"`"
16385        base="`$BASENAME "$path"`"
16386        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16387      fi
16388    fi
16389  fi
16390
16391
16392  # Only process if variable expands to non-empty
16393
16394  if test "x$TOPDIR" != x; then
16395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16396
16397  # Input might be given as Windows format, start by converting to
16398  # unix format.
16399  path="$TOPDIR"
16400  new_path=`$CYGPATH -u "$path"`
16401
16402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16405  # "foo.exe" is OK but "foo" is an error.
16406  #
16407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16408  # It is also a way to make sure we got the proper file name for the real test later on.
16409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16410  if test "x$test_shortpath" = x; then
16411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16412$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16413    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16414  fi
16415
16416  # Call helper function which possibly converts this using DOS-style short mode.
16417  # If so, the updated path is stored in $new_path.
16418
16419  input_path="$new_path"
16420  # Check if we need to convert this using DOS-style short mode. If the path
16421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16422  # take no chances and rewrite it.
16423  # Note: m4 eats our [], so we need to use [ and ] instead.
16424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16425  if test "x$has_forbidden_chars" != x; then
16426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16430      # Going to short mode and back again did indeed matter. Since short mode is
16431      # case insensitive, let's make it lowercase to improve readability.
16432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16433      # Now convert it back to Unix-style (cygpath)
16434      input_path=`$CYGPATH -u "$shortmode_path"`
16435      new_path="$input_path"
16436    fi
16437  fi
16438
16439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16440  if test "x$test_cygdrive_prefix" = x; then
16441    # As a simple fix, exclude /usr/bin since it's not a real path.
16442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16444      # a path prefixed by /cygdrive for fixpath to work.
16445      new_path="$CYGWIN_ROOT_PATH$input_path"
16446    fi
16447  fi
16448
16449
16450  if test "x$path" != "x$new_path"; then
16451    TOPDIR="$new_path"
16452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16453$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16454  fi
16455
16456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16457
16458  path="$TOPDIR"
16459  has_colon=`$ECHO $path | $GREP ^.:`
16460  new_path="$path"
16461  if test "x$has_colon" = x; then
16462    # Not in mixed or Windows style, start by that.
16463    new_path=`cmd //c echo $path`
16464  fi
16465
16466
16467  input_path="$new_path"
16468  # Check if we need to convert this using DOS-style short mode. If the path
16469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16470  # take no chances and rewrite it.
16471  # Note: m4 eats our [], so we need to use [ and ] instead.
16472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16473  if test "x$has_forbidden_chars" != x; then
16474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16476  fi
16477
16478
16479  windows_path="$new_path"
16480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16481    unix_path=`$CYGPATH -u "$windows_path"`
16482    new_path="$unix_path"
16483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16485    new_path="$unix_path"
16486  fi
16487
16488  if test "x$path" != "x$new_path"; then
16489    TOPDIR="$new_path"
16490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16491$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16492  fi
16493
16494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16496
16497    else
16498      # We're on a unix platform. Hooray! :)
16499      path="$TOPDIR"
16500      has_space=`$ECHO "$path" | $GREP " "`
16501      if test "x$has_space" != x; then
16502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16503$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16505      fi
16506
16507      # Use eval to expand a potential ~
16508      eval path="$path"
16509      if test ! -f "$path" && test ! -d "$path"; then
16510        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16511      fi
16512
16513      if test -d "$path"; then
16514        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16515      else
16516        dir="`$DIRNAME "$path"`"
16517        base="`$BASENAME "$path"`"
16518        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16519      fi
16520    fi
16521  fi
16522
16523  # SRC_ROOT is a traditional alias for TOPDIR.
16524  SRC_ROOT=$TOPDIR
16525
16526  # Calculate a canonical version of TOPDIR for string comparisons
16527  CANONICAL_TOPDIR=$TOPDIR
16528
16529  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16530    # Follow a chain of symbolic links. Use readlink
16531    # where it exists, else fall back to horribly
16532    # complicated shell code.
16533    if test "x$READLINK_TESTED" != yes; then
16534      # On MacOSX there is a readlink tool with a different
16535      # purpose than the GNU readlink tool. Check the found readlink.
16536      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16537      if test "x$ISGNU" = x; then
16538        # A readlink that we do not know how to use.
16539        # Are there other non-GNU readlinks out there?
16540        READLINK_TESTED=yes
16541        READLINK=
16542      fi
16543    fi
16544
16545    if test "x$READLINK" != x; then
16546      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16547    else
16548      # Save the current directory for restoring afterwards
16549      STARTDIR=$PWD
16550      COUNTER=0
16551      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16552      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16553      cd $sym_link_dir
16554      # Use -P flag to resolve symlinks in directories.
16555      cd `$THEPWDCMD -P`
16556      sym_link_dir=`$THEPWDCMD -P`
16557      # Resolve file symlinks
16558      while test $COUNTER -lt 20; do
16559        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16560        if test "x$ISLINK" == x; then
16561          # This is not a symbolic link! We are done!
16562          break
16563        fi
16564        # Again resolve directory symlinks since the target of the just found
16565        # link could be in a different directory
16566        cd `$DIRNAME $ISLINK`
16567        sym_link_dir=`$THEPWDCMD -P`
16568        sym_link_file=`$BASENAME $ISLINK`
16569        let COUNTER=COUNTER+1
16570      done
16571      cd $STARTDIR
16572      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16573    fi
16574  fi
16575
16576
16577
16578  # Locate the directory of this script.
16579  AUTOCONF_DIR=$TOPDIR/common/autoconf
16580
16581  # Setup username (for use in adhoc version strings etc)
16582  # Outer [ ] to quote m4.
16583   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16584
16585
16586
16587# Check if it's a pure open build or if custom sources are to be used.
16588
16589  # Check whether --enable-openjdk-only was given.
16590if test "${enable_openjdk_only+set}" = set; then :
16591  enableval=$enable_openjdk_only;
16592else
16593  enable_openjdk_only="no"
16594fi
16595
16596
16597  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16598$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16600$as_echo "$enable_openjdk_only" >&6; }
16601  if test "x$enable_openjdk_only" = "xyes"; then
16602    SUPPRESS_CUSTOM_EXTENSIONS="true"
16603  elif test "x$enable_openjdk_only" = "xno"; then
16604    SUPPRESS_CUSTOM_EXTENSIONS="false"
16605  else
16606    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16607  fi
16608
16609  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16610  # the IncludeCustomExtension macro.
16611
16612
16613# Check whether --with-custom-make-dir was given.
16614if test "${with_custom_make_dir+set}" = set; then :
16615  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
16616$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16617fi
16618
16619
16620
16621
16622# These are needed to be able to create a configuration name (and thus the output directory)
16623
16624  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16625$as_echo_n "checking which variant of the JDK to build... " >&6; }
16626
16627# Check whether --with-jdk-variant was given.
16628if test "${with_jdk_variant+set}" = set; then :
16629  withval=$with_jdk_variant;
16630fi
16631
16632
16633  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16634    JDK_VARIANT="normal"
16635  else
16636    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16637  fi
16638
16639
16640
16641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16642$as_echo "$JDK_VARIANT" >&6; }
16643
16644
16645  DEBUG_LEVEL="release"
16646  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16647$as_echo_n "checking which debug level to use... " >&6; }
16648  # Check whether --enable-debug was given.
16649if test "${enable_debug+set}" = set; then :
16650  enableval=$enable_debug;
16651        ENABLE_DEBUG="${enableval}"
16652        DEBUG_LEVEL="fastdebug"
16653
16654else
16655  ENABLE_DEBUG="no"
16656fi
16657
16658
16659
16660# Check whether --with-debug-level was given.
16661if test "${with_debug_level+set}" = set; then :
16662  withval=$with_debug_level;
16663        DEBUG_LEVEL="${withval}"
16664        if test "x$ENABLE_DEBUG" = xyes; then
16665          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16666        fi
16667
16668fi
16669
16670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16671$as_echo "$DEBUG_LEVEL" >&6; }
16672
16673  if test "x$DEBUG_LEVEL" != xrelease && \
16674      test "x$DEBUG_LEVEL" != xoptimized && \
16675      test "x$DEBUG_LEVEL" != xfastdebug && \
16676      test "x$DEBUG_LEVEL" != xslowdebug; then
16677    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16678  fi
16679
16680  # Translate DEBUG_LEVEL to debug level used by Hotspot
16681  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16682  if test "x$DEBUG_LEVEL" = xrelease; then
16683    HOTSPOT_DEBUG_LEVEL="product"
16684  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16685    HOTSPOT_DEBUG_LEVEL="debug"
16686  fi
16687
16688  if test "x$DEBUG_LEVEL" = xoptimized; then
16689    # The debug level 'optimized' is a little special because it is currently only
16690    # applicable to the HotSpot build where it means to build a completely
16691    # optimized version of the VM without any debugging code (like for the
16692    # 'release' debug level which is called 'product' in the HotSpot build) but
16693    # with the exception that it can contain additional code which is otherwise
16694    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16695    # test new and/or experimental features which are not intended for customer
16696    # shipment. Because these new features need to be tested and benchmarked in
16697    # real world scenarios, we want to build the containing JDK at the 'release'
16698    # debug level.
16699    DEBUG_LEVEL="release"
16700  fi
16701
16702
16703
16704
16705
16706
16707# Check whether --with-jvm-variants was given.
16708if test "${with_jvm_variants+set}" = set; then :
16709  withval=$with_jvm_variants;
16710fi
16711
16712
16713  if test "x$with_jvm_variants" = x; then
16714    with_jvm_variants="server"
16715  fi
16716  JVM_VARIANTS_OPT="$with_jvm_variants"
16717
16718  # Has the user listed more than one variant?
16719  # Additional [] needed to keep m4 from mangling shell constructs.
16720  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16721    BUILDING_MULTIPLE_JVM_VARIANTS=true
16722  else
16723    BUILDING_MULTIPLE_JVM_VARIANTS=false
16724  fi
16725  # Replace the commas with AND for use in the build directory name.
16726  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16727
16728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16729$as_echo_n "checking which variants of the JVM to build... " >&6; }
16730  # JVM_VARIANTS is a space-separated list.
16731  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16732  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16734$as_echo "$JVM_VARIANTS" >&6; }
16735
16736  # Check that the selected variants are valid
16737
16738  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16739  # Notice that the original variant failes on SLES 10 and 11
16740  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16741  STACK=${JVM_VARIANTS// /$'\n'}
16742  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16743  if test "x$INVALID_VARIANTS" != x; then
16744    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16745$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16746    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16747  fi
16748
16749  # All "special" variants share the same output directory ("server")
16750  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16751  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16752  STACK=${JVM_VARIANTS// /$'\n'}
16753  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16754  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16755    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16756  fi
16757
16758
16759
16760
16761  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16762    # zero behaves as a platform and rewrites these values. This is really weird. :(
16763    # We are guaranteed that we do not build any other variants when building zero.
16764    HOTSPOT_TARGET_CPU=zero
16765    HOTSPOT_TARGET_CPU_ARCH=zero
16766  fi
16767
16768
16769# With basic setup done, call the custom early hook.
16770
16771
16772# Check if we have devkits, extra paths or sysroot set.
16773
16774
16775# Check whether --with-devkit was given.
16776if test "${with_devkit+set}" = set; then :
16777  withval=$with_devkit;
16778
16779  # Only process if variable expands to non-empty
16780
16781  if test "x$with_devkit" != x; then
16782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783
16784  # Input might be given as Windows format, start by converting to
16785  # unix format.
16786  path="$with_devkit"
16787  new_path=`$CYGPATH -u "$path"`
16788
16789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16792  # "foo.exe" is OK but "foo" is an error.
16793  #
16794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16795  # It is also a way to make sure we got the proper file name for the real test later on.
16796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16797  if test "x$test_shortpath" = x; then
16798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16799$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16800    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16801  fi
16802
16803  # Call helper function which possibly converts this using DOS-style short mode.
16804  # If so, the updated path is stored in $new_path.
16805
16806  input_path="$new_path"
16807  # Check if we need to convert this using DOS-style short mode. If the path
16808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16809  # take no chances and rewrite it.
16810  # Note: m4 eats our [], so we need to use [ and ] instead.
16811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16812  if test "x$has_forbidden_chars" != x; then
16813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16817      # Going to short mode and back again did indeed matter. Since short mode is
16818      # case insensitive, let's make it lowercase to improve readability.
16819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16820      # Now convert it back to Unix-style (cygpath)
16821      input_path=`$CYGPATH -u "$shortmode_path"`
16822      new_path="$input_path"
16823    fi
16824  fi
16825
16826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16827  if test "x$test_cygdrive_prefix" = x; then
16828    # As a simple fix, exclude /usr/bin since it's not a real path.
16829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16831      # a path prefixed by /cygdrive for fixpath to work.
16832      new_path="$CYGWIN_ROOT_PATH$input_path"
16833    fi
16834  fi
16835
16836
16837  if test "x$path" != "x$new_path"; then
16838    with_devkit="$new_path"
16839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16840$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16841  fi
16842
16843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16844
16845  path="$with_devkit"
16846  has_colon=`$ECHO $path | $GREP ^.:`
16847  new_path="$path"
16848  if test "x$has_colon" = x; then
16849    # Not in mixed or Windows style, start by that.
16850    new_path=`cmd //c echo $path`
16851  fi
16852
16853
16854  input_path="$new_path"
16855  # Check if we need to convert this using DOS-style short mode. If the path
16856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857  # take no chances and rewrite it.
16858  # Note: m4 eats our [], so we need to use [ and ] instead.
16859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16860  if test "x$has_forbidden_chars" != x; then
16861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16863  fi
16864
16865
16866  windows_path="$new_path"
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868    unix_path=`$CYGPATH -u "$windows_path"`
16869    new_path="$unix_path"
16870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872    new_path="$unix_path"
16873  fi
16874
16875  if test "x$path" != "x$new_path"; then
16876    with_devkit="$new_path"
16877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16878$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16879  fi
16880
16881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16883
16884    else
16885      # We're on a unix platform. Hooray! :)
16886      path="$with_devkit"
16887      has_space=`$ECHO "$path" | $GREP " "`
16888      if test "x$has_space" != x; then
16889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16890$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16891        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16892      fi
16893
16894      # Use eval to expand a potential ~
16895      eval path="$path"
16896      if test ! -f "$path" && test ! -d "$path"; then
16897        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16898      fi
16899
16900      if test -d "$path"; then
16901        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16902      else
16903        dir="`$DIRNAME "$path"`"
16904        base="`$BASENAME "$path"`"
16905        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16906      fi
16907    fi
16908  fi
16909
16910        DEVKIT_ROOT="$with_devkit"
16911        # Check for a meta data info file in the root of the devkit
16912        if test -f "$DEVKIT_ROOT/devkit.info"; then
16913          . $DEVKIT_ROOT/devkit.info
16914          # This potentially sets the following:
16915          # A descriptive name of the devkit
16916
16917  if test "x$DEVKIT_NAME" = x; then
16918    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16919  fi
16920
16921          # Corresponds to --with-extra-path
16922
16923  if test "x$DEVKIT_EXTRA_PATH" = x; then
16924    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16925  fi
16926
16927          # Corresponds to --with-toolchain-path
16928
16929  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16930    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16931  fi
16932
16933          # Corresponds to --with-sysroot
16934
16935  if test "x$DEVKIT_SYSROOT" = x; then
16936    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16937  fi
16938
16939
16940          # Identifies the Visual Studio version in the devkit
16941
16942  if test "x$DEVKIT_VS_VERSION" = x; then
16943    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16944  fi
16945
16946          # The Visual Studio include environment variable
16947
16948  if test "x$DEVKIT_VS_INCLUDE" = x; then
16949    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16950  fi
16951
16952          # The Visual Studio lib environment variable
16953
16954  if test "x$DEVKIT_VS_LIB" = x; then
16955    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16956  fi
16957
16958          # Corresponds to --with-msvcr-dll
16959
16960  if test "x$DEVKIT_MSVCR_DLL" = x; then
16961    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16962  fi
16963
16964          # Corresponds to --with-msvcp-dll
16965
16966  if test "x$DEVKIT_MSVCP_DLL" = x; then
16967    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16968  fi
16969
16970        fi
16971
16972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16973$as_echo_n "checking for devkit... " >&6; }
16974        if test "x$DEVKIT_NAME" != x; then
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16976$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16977        else
16978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16979$as_echo "$DEVKIT_ROOT" >&6; }
16980        fi
16981
16982
16983  if test "x$DEVKIT_EXTRA_PATH" != x; then
16984    if test "x$EXTRA_PATH" = x; then
16985      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16986    else
16987      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16988    fi
16989  fi
16990
16991
16992        # Fallback default of just /bin if DEVKIT_PATH is not defined
16993        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16994          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16995        fi
16996
16997  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16998    if test "x$TOOLCHAIN_PATH" = x; then
16999      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17000    else
17001      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17002    fi
17003  fi
17004
17005
17006        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17007        # places for backwards compatiblity.
17008        if test "x$DEVKIT_SYSROOT" != x; then
17009          SYSROOT="$DEVKIT_SYSROOT"
17010        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17011          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17012        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17013          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17014        fi
17015
17016
17017fi
17018
17019
17020  # You can force the sysroot if the sysroot encoded into the compiler tools
17021  # is not correct.
17022
17023# Check whether --with-sys-root was given.
17024if test "${with_sys_root+set}" = set; then :
17025  withval=$with_sys_root; SYSROOT=$with_sys_root
17026
17027fi
17028
17029
17030
17031# Check whether --with-sysroot was given.
17032if test "${with_sysroot+set}" = set; then :
17033  withval=$with_sysroot; SYSROOT=$with_sysroot
17034
17035fi
17036
17037
17038
17039# Check whether --with-tools-dir was given.
17040if test "${with_tools_dir+set}" = set; then :
17041  withval=$with_tools_dir;
17042  if test "x$with_tools_dir" != x; then
17043    if test "x$TOOLCHAIN_PATH" = x; then
17044      TOOLCHAIN_PATH="$with_tools_dir"
17045    else
17046      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17047    fi
17048  fi
17049
17050
17051fi
17052
17053
17054
17055# Check whether --with-toolchain-path was given.
17056if test "${with_toolchain_path+set}" = set; then :
17057  withval=$with_toolchain_path;
17058  if test "x$with_toolchain_path" != x; then
17059    if test "x$TOOLCHAIN_PATH" = x; then
17060      TOOLCHAIN_PATH="$with_toolchain_path"
17061    else
17062      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17063    fi
17064  fi
17065
17066
17067fi
17068
17069
17070
17071# Check whether --with-extra-path was given.
17072if test "${with_extra_path+set}" = set; then :
17073  withval=$with_extra_path;
17074  if test "x$with_extra_path" != x; then
17075    if test "x$EXTRA_PATH" = x; then
17076      EXTRA_PATH="$with_extra_path"
17077    else
17078      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17079    fi
17080  fi
17081
17082
17083fi
17084
17085
17086  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17087    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17088    # If not, detect if Xcode is installed by running xcodebuild -version
17089    # if no Xcode installed, xcodebuild exits with 1
17090    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17091    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17092      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17093      # fall back on the stub binary in /usr/bin/xcodebuild
17094      # Extract the first word of "xcodebuild", so it can be a program name with args.
17095set dummy xcodebuild; ac_word=$2
17096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097$as_echo_n "checking for $ac_word... " >&6; }
17098if ${ac_cv_path_XCODEBUILD+:} false; then :
17099  $as_echo_n "(cached) " >&6
17100else
17101  case $XCODEBUILD in
17102  [\\/]* | ?:[\\/]*)
17103  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17104  ;;
17105  *)
17106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107for as_dir in $TOOLCHAIN_PATH
17108do
17109  IFS=$as_save_IFS
17110  test -z "$as_dir" && as_dir=.
17111    for ac_exec_ext in '' $ac_executable_extensions; do
17112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115    break 2
17116  fi
17117done
17118  done
17119IFS=$as_save_IFS
17120
17121  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17122  ;;
17123esac
17124fi
17125XCODEBUILD=$ac_cv_path_XCODEBUILD
17126if test -n "$XCODEBUILD"; then
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17128$as_echo "$XCODEBUILD" >&6; }
17129else
17130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17131$as_echo "no" >&6; }
17132fi
17133
17134
17135    else
17136      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17137      # when only the command line tools are installed there are no SDKs, so headers
17138      # are copied into the system frameworks
17139      XCODEBUILD=
17140
17141    fi
17142
17143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17144$as_echo_n "checking for sdk name... " >&6; }
17145
17146# Check whether --with-sdk-name was given.
17147if test "${with_sdk_name+set}" = set; then :
17148  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17149
17150fi
17151
17152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17153$as_echo "$SDKNAME" >&6; }
17154
17155    # if toolchain path is specified then don't rely on system headers, they may not compile
17156    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17157    test -z "$TOOLCHAIN_PATH" && \
17158      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17159
17160    if test -z "$SYSROOT"; then
17161      if test -n "$XCODEBUILD"; then
17162        # if we don't have system headers, use default SDK name (last resort)
17163        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17164          SDKNAME=${SDKNAME:-macosx}
17165        fi
17166
17167        if test -n "$SDKNAME"; then
17168          # Call xcodebuild to determine SYSROOT
17169          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17170        fi
17171      else
17172        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17173          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
17174        fi
17175      fi
17176    else
17177      # warn user if --with-sdk-name was also set
17178      if test -n "$with_sdk_name"; then
17179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17180$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17181      fi
17182    fi
17183
17184    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17185      # If no system framework headers, then SYSROOT must be set, or we won't build
17186      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
17187    fi
17188
17189    # Perform a basic sanity test
17190    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17191      if test -z "$SYSROOT"; then
17192        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
17193      else
17194        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17195      fi
17196    fi
17197
17198    # set SDKROOT too, Xcode tools will pick it up
17199    SDKROOT=$SYSROOT
17200
17201  fi
17202
17203  # Prepend the extra path to the global path
17204
17205  if test "x$EXTRA_PATH" != x; then
17206    if test "x$PATH" = x; then
17207      PATH="$EXTRA_PATH"
17208    else
17209      PATH="$EXTRA_PATH:$PATH"
17210    fi
17211  fi
17212
17213
17214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17215$as_echo_n "checking for sysroot... " >&6; }
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17217$as_echo "$SYSROOT" >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17219$as_echo_n "checking for toolchain path... " >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17221$as_echo "$TOOLCHAIN_PATH" >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17223$as_echo_n "checking for extra path... " >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17225$as_echo "$EXTRA_PATH" >&6; }
17226
17227
17228# To properly create a configuration name, we need to have the OpenJDK target
17229# and options (variants and debug level) parsed.
17230
17231
17232
17233# Check whether --with-conf-name was given.
17234if test "${with_conf_name+set}" = set; then :
17235  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17236fi
17237
17238
17239  # Test from where we are running configure, in or outside of src root.
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17241$as_echo_n "checking where to store configuration... " >&6; }
17242  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17243      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17244      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17245    # We are running configure from the src root.
17246    # Create a default ./build/target-variant-debuglevel output root.
17247    if test "x${CONF_NAME}" = x; then
17248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17249$as_echo "in default location" >&6; }
17250      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17251    else
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17253$as_echo "in build directory with custom name" >&6; }
17254    fi
17255    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17256    $MKDIR -p "$OUTPUT_ROOT"
17257    if test ! -d "$OUTPUT_ROOT"; then
17258      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17259    fi
17260  else
17261    # We are running configure from outside of the src dir.
17262    # Then use the current directory as output dir!
17263    # If configuration is situated in normal build directory, just use the build
17264    # directory name as configuration name, otherwise use the complete path.
17265    if test "x${CONF_NAME}" = x; then
17266      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17267    fi
17268    OUTPUT_ROOT="$CURDIR"
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17270$as_echo "in current directory" >&6; }
17271
17272    # WARNING: This might be a bad thing to do. You need to be sure you want to
17273    # have a configuration in this directory. Do some sanity checks!
17274
17275    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17276      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17277      # other files
17278      files_present=`$LS $OUTPUT_ROOT`
17279      # Configure has already touched config.log and confdefs.h in the current dir when this check
17280      # is performed.
17281      filtered_files=`$ECHO "$files_present" \
17282          | $SED -e 's/config.log//g' \
17283              -e 's/configure.log//g' \
17284              -e 's/confdefs.h//g' \
17285              -e 's/ //g' \
17286          | $TR -d '\n'`
17287      if test "x$filtered_files" != x; then
17288        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17289$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17291$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17293$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17295$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17297$as_echo "$as_me: seriously mess up just about everything." >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17299$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17301$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17302        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17303      fi
17304    fi
17305  fi
17306  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17307$as_echo_n "checking what configuration name to use... " >&6; }
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17309$as_echo "$CONF_NAME" >&6; }
17310
17311
17312  # Only process if variable expands to non-empty
17313
17314  if test "x$OUTPUT_ROOT" != x; then
17315    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17316
17317  # Input might be given as Windows format, start by converting to
17318  # unix format.
17319  path="$OUTPUT_ROOT"
17320  new_path=`$CYGPATH -u "$path"`
17321
17322  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17323  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17324  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17325  # "foo.exe" is OK but "foo" is an error.
17326  #
17327  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17328  # It is also a way to make sure we got the proper file name for the real test later on.
17329  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17330  if test "x$test_shortpath" = x; then
17331    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17332$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17333    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17334  fi
17335
17336  # Call helper function which possibly converts this using DOS-style short mode.
17337  # If so, the updated path is stored in $new_path.
17338
17339  input_path="$new_path"
17340  # Check if we need to convert this using DOS-style short mode. If the path
17341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17342  # take no chances and rewrite it.
17343  # Note: m4 eats our [], so we need to use [ and ] instead.
17344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17345  if test "x$has_forbidden_chars" != x; then
17346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17350      # Going to short mode and back again did indeed matter. Since short mode is
17351      # case insensitive, let's make it lowercase to improve readability.
17352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17353      # Now convert it back to Unix-style (cygpath)
17354      input_path=`$CYGPATH -u "$shortmode_path"`
17355      new_path="$input_path"
17356    fi
17357  fi
17358
17359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17360  if test "x$test_cygdrive_prefix" = x; then
17361    # As a simple fix, exclude /usr/bin since it's not a real path.
17362    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17364      # a path prefixed by /cygdrive for fixpath to work.
17365      new_path="$CYGWIN_ROOT_PATH$input_path"
17366    fi
17367  fi
17368
17369
17370  if test "x$path" != "x$new_path"; then
17371    OUTPUT_ROOT="$new_path"
17372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17373$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17374  fi
17375
17376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17377
17378  path="$OUTPUT_ROOT"
17379  has_colon=`$ECHO $path | $GREP ^.:`
17380  new_path="$path"
17381  if test "x$has_colon" = x; then
17382    # Not in mixed or Windows style, start by that.
17383    new_path=`cmd //c echo $path`
17384  fi
17385
17386
17387  input_path="$new_path"
17388  # Check if we need to convert this using DOS-style short mode. If the path
17389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17390  # take no chances and rewrite it.
17391  # Note: m4 eats our [], so we need to use [ and ] instead.
17392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17393  if test "x$has_forbidden_chars" != x; then
17394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17396  fi
17397
17398
17399  windows_path="$new_path"
17400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17401    unix_path=`$CYGPATH -u "$windows_path"`
17402    new_path="$unix_path"
17403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17405    new_path="$unix_path"
17406  fi
17407
17408  if test "x$path" != "x$new_path"; then
17409    OUTPUT_ROOT="$new_path"
17410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17411$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17412  fi
17413
17414  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17415  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17416
17417    else
17418      # We're on a unix platform. Hooray! :)
17419      path="$OUTPUT_ROOT"
17420      has_space=`$ECHO "$path" | $GREP " "`
17421      if test "x$has_space" != x; then
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17423$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17424        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17425      fi
17426
17427      # Use eval to expand a potential ~
17428      eval path="$path"
17429      if test ! -f "$path" && test ! -d "$path"; then
17430        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17431      fi
17432
17433      if test -d "$path"; then
17434        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17435      else
17436        dir="`$DIRNAME "$path"`"
17437        base="`$BASENAME "$path"`"
17438        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17439      fi
17440    fi
17441  fi
17442
17443
17444  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17445  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17446
17447  SPEC=$OUTPUT_ROOT/spec.gmk
17448
17449  CONF_NAME=$CONF_NAME
17450
17451  OUTPUT_ROOT=$OUTPUT_ROOT
17452
17453
17454
17455  # The spec.gmk file contains all variables for the make system.
17456  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17457
17458  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17459  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17460
17461  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17462  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17463
17464  # The compare.sh is used to compare the build output to other builds.
17465  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17466
17467  # The generated Makefile knows where the spec.gmk is and where the source is.
17468  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17469  # which will look for generated configurations
17470  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17471
17472
17473
17474# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17475
17476  for ac_prog in apt-get yum port pkgutil pkgadd
17477do
17478  # Extract the first word of "$ac_prog", so it can be a program name with args.
17479set dummy $ac_prog; ac_word=$2
17480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17481$as_echo_n "checking for $ac_word... " >&6; }
17482if ${ac_cv_prog_PKGHANDLER+:} false; then :
17483  $as_echo_n "(cached) " >&6
17484else
17485  if test -n "$PKGHANDLER"; then
17486  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17487else
17488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489for as_dir in $PATH
17490do
17491  IFS=$as_save_IFS
17492  test -z "$as_dir" && as_dir=.
17493    for ac_exec_ext in '' $ac_executable_extensions; do
17494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17495    ac_cv_prog_PKGHANDLER="$ac_prog"
17496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17497    break 2
17498  fi
17499done
17500  done
17501IFS=$as_save_IFS
17502
17503fi
17504fi
17505PKGHANDLER=$ac_cv_prog_PKGHANDLER
17506if test -n "$PKGHANDLER"; then
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17508$as_echo "$PKGHANDLER" >&6; }
17509else
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511$as_echo "no" >&6; }
17512fi
17513
17514
17515  test -n "$PKGHANDLER" && break
17516done
17517
17518
17519
17520# Setup tools that requires more complex handling, or that is not needed by the configure script.
17521
17522
17523
17524  # Publish this variable in the help.
17525
17526
17527  if [ -z "${MAKE+x}" ]; then
17528    # The variable is not set by user, try to locate tool using the code snippet
17529
17530    # Try our hardest to locate a correct version of GNU make
17531    for ac_prog in gmake
17532do
17533  # Extract the first word of "$ac_prog", so it can be a program name with args.
17534set dummy $ac_prog; ac_word=$2
17535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17536$as_echo_n "checking for $ac_word... " >&6; }
17537if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17538  $as_echo_n "(cached) " >&6
17539else
17540  case $CHECK_GMAKE in
17541  [\\/]* | ?:[\\/]*)
17542  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17543  ;;
17544  *)
17545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17546for as_dir in $PATH
17547do
17548  IFS=$as_save_IFS
17549  test -z "$as_dir" && as_dir=.
17550    for ac_exec_ext in '' $ac_executable_extensions; do
17551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17552    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17554    break 2
17555  fi
17556done
17557  done
17558IFS=$as_save_IFS
17559
17560  ;;
17561esac
17562fi
17563CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17564if test -n "$CHECK_GMAKE"; then
17565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17566$as_echo "$CHECK_GMAKE" >&6; }
17567else
17568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17569$as_echo "no" >&6; }
17570fi
17571
17572
17573  test -n "$CHECK_GMAKE" && break
17574done
17575
17576
17577  MAKE_CANDIDATE=""$CHECK_GMAKE""
17578  DESCRIPTION="gmake in PATH"
17579
17580  # On Cygwin, we require a newer version of make than on other platforms
17581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17582    MAKE_VERSION_EXPR="-e 4\."
17583    MAKE_REQUIRED_VERSION="4.0"
17584   else
17585    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17586    MAKE_REQUIRED_VERSION="3.81"
17587  fi
17588
17589  if test "x$MAKE_CANDIDATE" != x; then
17590    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17591$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17592    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17593    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17594    if test "x$IS_GNU_MAKE" = x; then
17595      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17596$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17597    else
17598      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17599      if test "x$IS_MODERN_MAKE" = x; then
17600        { $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
17601$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;}
17602      else
17603        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17604          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17605            MAKE_EXPECTED_ENV='cygwin'
17606          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17607            MAKE_EXPECTED_ENV='msys'
17608          else
17609            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17610          fi
17611          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17612          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17613        else
17614          # Not relevant for non-Windows
17615          IS_MAKE_CORRECT_ENV=true
17616        fi
17617        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17618          { $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
17619$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;}
17620        else
17621          FOUND_MAKE=$MAKE_CANDIDATE
17622
17623  # Only process if variable expands to non-empty
17624
17625  if test "x$FOUND_MAKE" != x; then
17626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17627
17628  # First separate the path from the arguments. This will split at the first
17629  # space.
17630  complete="$FOUND_MAKE"
17631  path="${complete%% *}"
17632  tmp="$complete EOL"
17633  arguments="${tmp#* }"
17634
17635  # Input might be given as Windows format, start by converting to
17636  # unix format.
17637  new_path=`$CYGPATH -u "$path"`
17638
17639  # Now try to locate executable using which
17640  new_path=`$WHICH "$new_path" 2> /dev/null`
17641  # bat and cmd files are not always considered executable in cygwin causing which
17642  # to not find them
17643  if test "x$new_path" = x \
17644      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17645      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17646    new_path=`$CYGPATH -u "$path"`
17647  fi
17648  if test "x$new_path" = x; then
17649    # Oops. Which didn't find the executable.
17650    # The splitting of arguments from the executable at a space might have been incorrect,
17651    # since paths with space are more likely in Windows. Give it another try with the whole
17652    # argument.
17653    path="$complete"
17654    arguments="EOL"
17655    new_path=`$CYGPATH -u "$path"`
17656    new_path=`$WHICH "$new_path" 2> /dev/null`
17657    # bat and cmd files are not always considered executable in cygwin causing which
17658    # to not find them
17659    if test "x$new_path" = x \
17660        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17661        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17662      new_path=`$CYGPATH -u "$path"`
17663    fi
17664    if test "x$new_path" = x; then
17665      # It's still not found. Now this is an unrecoverable error.
17666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17667$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17668      has_space=`$ECHO "$complete" | $GREP " "`
17669      if test "x$has_space" != x; then
17670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17672      fi
17673      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17674    fi
17675  fi
17676
17677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17680  # "foo.exe" is OK but "foo" is an error.
17681  #
17682  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17683  # It is also a way to make sure we got the proper file name for the real test later on.
17684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17685  if test "x$test_shortpath" = x; then
17686    # Short path failed, file does not exist as specified.
17687    # Try adding .exe or .cmd
17688    if test -f "${new_path}.exe"; then
17689      input_to_shortpath="${new_path}.exe"
17690    elif test -f "${new_path}.cmd"; then
17691      input_to_shortpath="${new_path}.cmd"
17692    else
17693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17696$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17697      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17698    fi
17699  else
17700    input_to_shortpath="$new_path"
17701  fi
17702
17703  # Call helper function which possibly converts this using DOS-style short mode.
17704  # If so, the updated path is stored in $new_path.
17705  new_path="$input_to_shortpath"
17706
17707  input_path="$input_to_shortpath"
17708  # Check if we need to convert this using DOS-style short mode. If the path
17709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17710  # take no chances and rewrite it.
17711  # Note: m4 eats our [], so we need to use [ and ] instead.
17712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17713  if test "x$has_forbidden_chars" != x; then
17714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17715    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17716    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17717    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17718      # Going to short mode and back again did indeed matter. Since short mode is
17719      # case insensitive, let's make it lowercase to improve readability.
17720      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17721      # Now convert it back to Unix-style (cygpath)
17722      input_path=`$CYGPATH -u "$shortmode_path"`
17723      new_path="$input_path"
17724    fi
17725  fi
17726
17727  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17728  if test "x$test_cygdrive_prefix" = x; then
17729    # As a simple fix, exclude /usr/bin since it's not a real path.
17730    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17731      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17732      # a path prefixed by /cygdrive for fixpath to work.
17733      new_path="$CYGWIN_ROOT_PATH$input_path"
17734    fi
17735  fi
17736
17737  # remove trailing .exe if any
17738  new_path="${new_path/%.exe/}"
17739
17740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741
17742  # First separate the path from the arguments. This will split at the first
17743  # space.
17744  complete="$FOUND_MAKE"
17745  path="${complete%% *}"
17746  tmp="$complete EOL"
17747  arguments="${tmp#* }"
17748
17749  # Input might be given as Windows format, start by converting to
17750  # unix format.
17751  new_path="$path"
17752
17753  windows_path="$new_path"
17754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17755    unix_path=`$CYGPATH -u "$windows_path"`
17756    new_path="$unix_path"
17757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17759    new_path="$unix_path"
17760  fi
17761
17762
17763  # Now try to locate executable using which
17764  new_path=`$WHICH "$new_path" 2> /dev/null`
17765
17766  if test "x$new_path" = x; then
17767    # Oops. Which didn't find the executable.
17768    # The splitting of arguments from the executable at a space might have been incorrect,
17769    # since paths with space are more likely in Windows. Give it another try with the whole
17770    # argument.
17771    path="$complete"
17772    arguments="EOL"
17773    new_path="$path"
17774
17775  windows_path="$new_path"
17776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17777    unix_path=`$CYGPATH -u "$windows_path"`
17778    new_path="$unix_path"
17779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17781    new_path="$unix_path"
17782  fi
17783
17784
17785    new_path=`$WHICH "$new_path" 2> /dev/null`
17786    # bat and cmd files are not always considered executable in MSYS causing which
17787    # to not find them
17788    if test "x$new_path" = x \
17789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17791      new_path="$path"
17792
17793  windows_path="$new_path"
17794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17795    unix_path=`$CYGPATH -u "$windows_path"`
17796    new_path="$unix_path"
17797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17799    new_path="$unix_path"
17800  fi
17801
17802    fi
17803
17804    if test "x$new_path" = x; then
17805      # It's still not found. Now this is an unrecoverable error.
17806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17807$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17808      has_space=`$ECHO "$complete" | $GREP " "`
17809      if test "x$has_space" != x; then
17810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17812      fi
17813      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17814    fi
17815  fi
17816
17817  # Now new_path has a complete unix path to the binary
17818  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17819    # Keep paths in /bin as-is, but remove trailing .exe if any
17820    new_path="${new_path/%.exe/}"
17821    # Do not save /bin paths to all_fixpath_prefixes!
17822  else
17823    # Not in mixed or Windows style, start by that.
17824    new_path=`cmd //c echo $new_path`
17825
17826  input_path="$new_path"
17827  # Check if we need to convert this using DOS-style short mode. If the path
17828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17829  # take no chances and rewrite it.
17830  # Note: m4 eats our [], so we need to use [ and ] instead.
17831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17832  if test "x$has_forbidden_chars" != x; then
17833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17834    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17835  fi
17836
17837    # Output is in $new_path
17838
17839  windows_path="$new_path"
17840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17841    unix_path=`$CYGPATH -u "$windows_path"`
17842    new_path="$unix_path"
17843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17845    new_path="$unix_path"
17846  fi
17847
17848    # remove trailing .exe if any
17849    new_path="${new_path/%.exe/}"
17850
17851    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17852    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17853  fi
17854
17855    else
17856      # We're on a unix platform. Hooray! :)
17857      # First separate the path from the arguments. This will split at the first
17858      # space.
17859      complete="$FOUND_MAKE"
17860      path="${complete%% *}"
17861      tmp="$complete EOL"
17862      arguments="${tmp#* }"
17863
17864      # Cannot rely on the command "which" here since it doesn't always work.
17865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17866      if test -z "$is_absolute_path"; then
17867        # Path to executable is not absolute. Find it.
17868        IFS_save="$IFS"
17869        IFS=:
17870        for p in $PATH; do
17871          if test -f "$p/$path" && test -x "$p/$path"; then
17872            new_path="$p/$path"
17873            break
17874          fi
17875        done
17876        IFS="$IFS_save"
17877      else
17878        # This is an absolute path, we can use it without further modifications.
17879        new_path="$path"
17880      fi
17881
17882      if test "x$new_path" = x; then
17883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17884$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17885        has_space=`$ECHO "$complete" | $GREP " "`
17886        if test "x$has_space" != x; then
17887          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17888$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17889        fi
17890        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17891      fi
17892    fi
17893
17894    # Now join together the path and the arguments once again
17895    if test "x$arguments" != xEOL; then
17896      new_complete="$new_path ${arguments% *}"
17897    else
17898      new_complete="$new_path"
17899    fi
17900
17901    if test "x$complete" != "x$new_complete"; then
17902      FOUND_MAKE="$new_complete"
17903      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17904$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17905    fi
17906  fi
17907
17908        fi
17909      fi
17910    fi
17911  fi
17912
17913
17914    if test "x$FOUND_MAKE" = x; then
17915      for ac_prog in make
17916do
17917  # Extract the first word of "$ac_prog", so it can be a program name with args.
17918set dummy $ac_prog; ac_word=$2
17919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17920$as_echo_n "checking for $ac_word... " >&6; }
17921if ${ac_cv_path_CHECK_MAKE+:} false; then :
17922  $as_echo_n "(cached) " >&6
17923else
17924  case $CHECK_MAKE in
17925  [\\/]* | ?:[\\/]*)
17926  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17927  ;;
17928  *)
17929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17930for as_dir in $PATH
17931do
17932  IFS=$as_save_IFS
17933  test -z "$as_dir" && as_dir=.
17934    for ac_exec_ext in '' $ac_executable_extensions; do
17935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17936    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17938    break 2
17939  fi
17940done
17941  done
17942IFS=$as_save_IFS
17943
17944  ;;
17945esac
17946fi
17947CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17948if test -n "$CHECK_MAKE"; then
17949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17950$as_echo "$CHECK_MAKE" >&6; }
17951else
17952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17953$as_echo "no" >&6; }
17954fi
17955
17956
17957  test -n "$CHECK_MAKE" && break
17958done
17959
17960
17961  MAKE_CANDIDATE=""$CHECK_MAKE""
17962  DESCRIPTION="make in PATH"
17963
17964  # On Cygwin, we require a newer version of make than on other platforms
17965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17966    MAKE_VERSION_EXPR="-e 4\."
17967    MAKE_REQUIRED_VERSION="4.0"
17968   else
17969    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17970    MAKE_REQUIRED_VERSION="3.81"
17971  fi
17972
17973  if test "x$MAKE_CANDIDATE" != x; then
17974    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17975$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17976    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17977    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17978    if test "x$IS_GNU_MAKE" = x; then
17979      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17980$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17981    else
17982      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17983      if test "x$IS_MODERN_MAKE" = x; then
17984        { $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
17985$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;}
17986      else
17987        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17988          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17989            MAKE_EXPECTED_ENV='cygwin'
17990          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17991            MAKE_EXPECTED_ENV='msys'
17992          else
17993            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17994          fi
17995          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17996          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17997        else
17998          # Not relevant for non-Windows
17999          IS_MAKE_CORRECT_ENV=true
18000        fi
18001        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18002          { $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
18003$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;}
18004        else
18005          FOUND_MAKE=$MAKE_CANDIDATE
18006
18007  # Only process if variable expands to non-empty
18008
18009  if test "x$FOUND_MAKE" != x; then
18010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18011
18012  # First separate the path from the arguments. This will split at the first
18013  # space.
18014  complete="$FOUND_MAKE"
18015  path="${complete%% *}"
18016  tmp="$complete EOL"
18017  arguments="${tmp#* }"
18018
18019  # Input might be given as Windows format, start by converting to
18020  # unix format.
18021  new_path=`$CYGPATH -u "$path"`
18022
18023  # Now try to locate executable using which
18024  new_path=`$WHICH "$new_path" 2> /dev/null`
18025  # bat and cmd files are not always considered executable in cygwin causing which
18026  # to not find them
18027  if test "x$new_path" = x \
18028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18030    new_path=`$CYGPATH -u "$path"`
18031  fi
18032  if test "x$new_path" = x; then
18033    # Oops. Which didn't find the executable.
18034    # The splitting of arguments from the executable at a space might have been incorrect,
18035    # since paths with space are more likely in Windows. Give it another try with the whole
18036    # argument.
18037    path="$complete"
18038    arguments="EOL"
18039    new_path=`$CYGPATH -u "$path"`
18040    new_path=`$WHICH "$new_path" 2> /dev/null`
18041    # bat and cmd files are not always considered executable in cygwin causing which
18042    # to not find them
18043    if test "x$new_path" = x \
18044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18046      new_path=`$CYGPATH -u "$path"`
18047    fi
18048    if test "x$new_path" = x; then
18049      # It's still not found. Now this is an unrecoverable error.
18050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18051$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18052      has_space=`$ECHO "$complete" | $GREP " "`
18053      if test "x$has_space" != x; then
18054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18056      fi
18057      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18058    fi
18059  fi
18060
18061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18064  # "foo.exe" is OK but "foo" is an error.
18065  #
18066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18067  # It is also a way to make sure we got the proper file name for the real test later on.
18068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18069  if test "x$test_shortpath" = x; then
18070    # Short path failed, file does not exist as specified.
18071    # Try adding .exe or .cmd
18072    if test -f "${new_path}.exe"; then
18073      input_to_shortpath="${new_path}.exe"
18074    elif test -f "${new_path}.cmd"; then
18075      input_to_shortpath="${new_path}.cmd"
18076    else
18077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18078$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18081      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18082    fi
18083  else
18084    input_to_shortpath="$new_path"
18085  fi
18086
18087  # Call helper function which possibly converts this using DOS-style short mode.
18088  # If so, the updated path is stored in $new_path.
18089  new_path="$input_to_shortpath"
18090
18091  input_path="$input_to_shortpath"
18092  # Check if we need to convert this using DOS-style short mode. If the path
18093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18094  # take no chances and rewrite it.
18095  # Note: m4 eats our [], so we need to use [ and ] instead.
18096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18097  if test "x$has_forbidden_chars" != x; then
18098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18102      # Going to short mode and back again did indeed matter. Since short mode is
18103      # case insensitive, let's make it lowercase to improve readability.
18104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18105      # Now convert it back to Unix-style (cygpath)
18106      input_path=`$CYGPATH -u "$shortmode_path"`
18107      new_path="$input_path"
18108    fi
18109  fi
18110
18111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18112  if test "x$test_cygdrive_prefix" = x; then
18113    # As a simple fix, exclude /usr/bin since it's not a real path.
18114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18116      # a path prefixed by /cygdrive for fixpath to work.
18117      new_path="$CYGWIN_ROOT_PATH$input_path"
18118    fi
18119  fi
18120
18121  # remove trailing .exe if any
18122  new_path="${new_path/%.exe/}"
18123
18124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18125
18126  # First separate the path from the arguments. This will split at the first
18127  # space.
18128  complete="$FOUND_MAKE"
18129  path="${complete%% *}"
18130  tmp="$complete EOL"
18131  arguments="${tmp#* }"
18132
18133  # Input might be given as Windows format, start by converting to
18134  # unix format.
18135  new_path="$path"
18136
18137  windows_path="$new_path"
18138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18139    unix_path=`$CYGPATH -u "$windows_path"`
18140    new_path="$unix_path"
18141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18143    new_path="$unix_path"
18144  fi
18145
18146
18147  # Now try to locate executable using which
18148  new_path=`$WHICH "$new_path" 2> /dev/null`
18149
18150  if test "x$new_path" = x; then
18151    # Oops. Which didn't find the executable.
18152    # The splitting of arguments from the executable at a space might have been incorrect,
18153    # since paths with space are more likely in Windows. Give it another try with the whole
18154    # argument.
18155    path="$complete"
18156    arguments="EOL"
18157    new_path="$path"
18158
18159  windows_path="$new_path"
18160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18161    unix_path=`$CYGPATH -u "$windows_path"`
18162    new_path="$unix_path"
18163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18165    new_path="$unix_path"
18166  fi
18167
18168
18169    new_path=`$WHICH "$new_path" 2> /dev/null`
18170    # bat and cmd files are not always considered executable in MSYS causing which
18171    # to not find them
18172    if test "x$new_path" = x \
18173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18175      new_path="$path"
18176
18177  windows_path="$new_path"
18178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18179    unix_path=`$CYGPATH -u "$windows_path"`
18180    new_path="$unix_path"
18181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18183    new_path="$unix_path"
18184  fi
18185
18186    fi
18187
18188    if test "x$new_path" = x; then
18189      # It's still not found. Now this is an unrecoverable error.
18190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18191$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18192      has_space=`$ECHO "$complete" | $GREP " "`
18193      if test "x$has_space" != x; then
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18196      fi
18197      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18198    fi
18199  fi
18200
18201  # Now new_path has a complete unix path to the binary
18202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18203    # Keep paths in /bin as-is, but remove trailing .exe if any
18204    new_path="${new_path/%.exe/}"
18205    # Do not save /bin paths to all_fixpath_prefixes!
18206  else
18207    # Not in mixed or Windows style, start by that.
18208    new_path=`cmd //c echo $new_path`
18209
18210  input_path="$new_path"
18211  # Check if we need to convert this using DOS-style short mode. If the path
18212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18213  # take no chances and rewrite it.
18214  # Note: m4 eats our [], so we need to use [ and ] instead.
18215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18216  if test "x$has_forbidden_chars" != x; then
18217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18219  fi
18220
18221    # Output is in $new_path
18222
18223  windows_path="$new_path"
18224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18225    unix_path=`$CYGPATH -u "$windows_path"`
18226    new_path="$unix_path"
18227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18229    new_path="$unix_path"
18230  fi
18231
18232    # remove trailing .exe if any
18233    new_path="${new_path/%.exe/}"
18234
18235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18237  fi
18238
18239    else
18240      # We're on a unix platform. Hooray! :)
18241      # First separate the path from the arguments. This will split at the first
18242      # space.
18243      complete="$FOUND_MAKE"
18244      path="${complete%% *}"
18245      tmp="$complete EOL"
18246      arguments="${tmp#* }"
18247
18248      # Cannot rely on the command "which" here since it doesn't always work.
18249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18250      if test -z "$is_absolute_path"; then
18251        # Path to executable is not absolute. Find it.
18252        IFS_save="$IFS"
18253        IFS=:
18254        for p in $PATH; do
18255          if test -f "$p/$path" && test -x "$p/$path"; then
18256            new_path="$p/$path"
18257            break
18258          fi
18259        done
18260        IFS="$IFS_save"
18261      else
18262        # This is an absolute path, we can use it without further modifications.
18263        new_path="$path"
18264      fi
18265
18266      if test "x$new_path" = x; then
18267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18268$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18269        has_space=`$ECHO "$complete" | $GREP " "`
18270        if test "x$has_space" != x; then
18271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18273        fi
18274        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18275      fi
18276    fi
18277
18278    # Now join together the path and the arguments once again
18279    if test "x$arguments" != xEOL; then
18280      new_complete="$new_path ${arguments% *}"
18281    else
18282      new_complete="$new_path"
18283    fi
18284
18285    if test "x$complete" != "x$new_complete"; then
18286      FOUND_MAKE="$new_complete"
18287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18288$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18289    fi
18290  fi
18291
18292        fi
18293      fi
18294    fi
18295  fi
18296
18297    fi
18298
18299    if test "x$FOUND_MAKE" = x; then
18300      if test "x$TOOLCHAIN_PATH" != x; then
18301        # We have a toolchain path, check that as well before giving up.
18302        OLD_PATH=$PATH
18303        PATH=$TOOLCHAIN_PATH:$PATH
18304        for ac_prog in gmake
18305do
18306  # Extract the first word of "$ac_prog", so it can be a program name with args.
18307set dummy $ac_prog; ac_word=$2
18308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18309$as_echo_n "checking for $ac_word... " >&6; }
18310if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18311  $as_echo_n "(cached) " >&6
18312else
18313  case $CHECK_TOOLSDIR_GMAKE in
18314  [\\/]* | ?:[\\/]*)
18315  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18316  ;;
18317  *)
18318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18319for as_dir in $PATH
18320do
18321  IFS=$as_save_IFS
18322  test -z "$as_dir" && as_dir=.
18323    for ac_exec_ext in '' $ac_executable_extensions; do
18324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18325    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18327    break 2
18328  fi
18329done
18330  done
18331IFS=$as_save_IFS
18332
18333  ;;
18334esac
18335fi
18336CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18337if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18339$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18340else
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342$as_echo "no" >&6; }
18343fi
18344
18345
18346  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18347done
18348
18349
18350  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18351  DESCRIPTION="gmake in tools-dir"
18352
18353  # On Cygwin, we require a newer version of make than on other platforms
18354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355    MAKE_VERSION_EXPR="-e 4\."
18356    MAKE_REQUIRED_VERSION="4.0"
18357   else
18358    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18359    MAKE_REQUIRED_VERSION="3.81"
18360  fi
18361
18362  if test "x$MAKE_CANDIDATE" != x; then
18363    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18364$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18365    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18366    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18367    if test "x$IS_GNU_MAKE" = x; then
18368      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18369$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18370    else
18371      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18372      if test "x$IS_MODERN_MAKE" = x; then
18373        { $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
18374$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;}
18375      else
18376        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18377          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18378            MAKE_EXPECTED_ENV='cygwin'
18379          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380            MAKE_EXPECTED_ENV='msys'
18381          else
18382            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18383          fi
18384          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18385          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18386        else
18387          # Not relevant for non-Windows
18388          IS_MAKE_CORRECT_ENV=true
18389        fi
18390        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18391          { $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
18392$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;}
18393        else
18394          FOUND_MAKE=$MAKE_CANDIDATE
18395
18396  # Only process if variable expands to non-empty
18397
18398  if test "x$FOUND_MAKE" != x; then
18399    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400
18401  # First separate the path from the arguments. This will split at the first
18402  # space.
18403  complete="$FOUND_MAKE"
18404  path="${complete%% *}"
18405  tmp="$complete EOL"
18406  arguments="${tmp#* }"
18407
18408  # Input might be given as Windows format, start by converting to
18409  # unix format.
18410  new_path=`$CYGPATH -u "$path"`
18411
18412  # Now try to locate executable using which
18413  new_path=`$WHICH "$new_path" 2> /dev/null`
18414  # bat and cmd files are not always considered executable in cygwin causing which
18415  # to not find them
18416  if test "x$new_path" = x \
18417      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18418      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18419    new_path=`$CYGPATH -u "$path"`
18420  fi
18421  if test "x$new_path" = x; then
18422    # Oops. Which didn't find the executable.
18423    # The splitting of arguments from the executable at a space might have been incorrect,
18424    # since paths with space are more likely in Windows. Give it another try with the whole
18425    # argument.
18426    path="$complete"
18427    arguments="EOL"
18428    new_path=`$CYGPATH -u "$path"`
18429    new_path=`$WHICH "$new_path" 2> /dev/null`
18430    # bat and cmd files are not always considered executable in cygwin causing which
18431    # to not find them
18432    if test "x$new_path" = x \
18433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18435      new_path=`$CYGPATH -u "$path"`
18436    fi
18437    if test "x$new_path" = x; then
18438      # It's still not found. Now this is an unrecoverable error.
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18440$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18441      has_space=`$ECHO "$complete" | $GREP " "`
18442      if test "x$has_space" != x; then
18443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18445      fi
18446      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18447    fi
18448  fi
18449
18450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18453  # "foo.exe" is OK but "foo" is an error.
18454  #
18455  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18456  # It is also a way to make sure we got the proper file name for the real test later on.
18457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18458  if test "x$test_shortpath" = x; then
18459    # Short path failed, file does not exist as specified.
18460    # Try adding .exe or .cmd
18461    if test -f "${new_path}.exe"; then
18462      input_to_shortpath="${new_path}.exe"
18463    elif test -f "${new_path}.cmd"; then
18464      input_to_shortpath="${new_path}.cmd"
18465    else
18466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18467$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18469$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18470      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18471    fi
18472  else
18473    input_to_shortpath="$new_path"
18474  fi
18475
18476  # Call helper function which possibly converts this using DOS-style short mode.
18477  # If so, the updated path is stored in $new_path.
18478  new_path="$input_to_shortpath"
18479
18480  input_path="$input_to_shortpath"
18481  # Check if we need to convert this using DOS-style short mode. If the path
18482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18483  # take no chances and rewrite it.
18484  # Note: m4 eats our [], so we need to use [ and ] instead.
18485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18486  if test "x$has_forbidden_chars" != x; then
18487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18488    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18489    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18490    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18491      # Going to short mode and back again did indeed matter. Since short mode is
18492      # case insensitive, let's make it lowercase to improve readability.
18493      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18494      # Now convert it back to Unix-style (cygpath)
18495      input_path=`$CYGPATH -u "$shortmode_path"`
18496      new_path="$input_path"
18497    fi
18498  fi
18499
18500  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18501  if test "x$test_cygdrive_prefix" = x; then
18502    # As a simple fix, exclude /usr/bin since it's not a real path.
18503    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18504      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18505      # a path prefixed by /cygdrive for fixpath to work.
18506      new_path="$CYGWIN_ROOT_PATH$input_path"
18507    fi
18508  fi
18509
18510  # remove trailing .exe if any
18511  new_path="${new_path/%.exe/}"
18512
18513    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18514
18515  # First separate the path from the arguments. This will split at the first
18516  # space.
18517  complete="$FOUND_MAKE"
18518  path="${complete%% *}"
18519  tmp="$complete EOL"
18520  arguments="${tmp#* }"
18521
18522  # Input might be given as Windows format, start by converting to
18523  # unix format.
18524  new_path="$path"
18525
18526  windows_path="$new_path"
18527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18528    unix_path=`$CYGPATH -u "$windows_path"`
18529    new_path="$unix_path"
18530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18532    new_path="$unix_path"
18533  fi
18534
18535
18536  # Now try to locate executable using which
18537  new_path=`$WHICH "$new_path" 2> /dev/null`
18538
18539  if test "x$new_path" = x; then
18540    # Oops. Which didn't find the executable.
18541    # The splitting of arguments from the executable at a space might have been incorrect,
18542    # since paths with space are more likely in Windows. Give it another try with the whole
18543    # argument.
18544    path="$complete"
18545    arguments="EOL"
18546    new_path="$path"
18547
18548  windows_path="$new_path"
18549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18550    unix_path=`$CYGPATH -u "$windows_path"`
18551    new_path="$unix_path"
18552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18554    new_path="$unix_path"
18555  fi
18556
18557
18558    new_path=`$WHICH "$new_path" 2> /dev/null`
18559    # bat and cmd files are not always considered executable in MSYS causing which
18560    # to not find them
18561    if test "x$new_path" = x \
18562        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18563        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18564      new_path="$path"
18565
18566  windows_path="$new_path"
18567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18568    unix_path=`$CYGPATH -u "$windows_path"`
18569    new_path="$unix_path"
18570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18572    new_path="$unix_path"
18573  fi
18574
18575    fi
18576
18577    if test "x$new_path" = x; then
18578      # It's still not found. Now this is an unrecoverable error.
18579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18580$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18581      has_space=`$ECHO "$complete" | $GREP " "`
18582      if test "x$has_space" != x; then
18583        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18584$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18585      fi
18586      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18587    fi
18588  fi
18589
18590  # Now new_path has a complete unix path to the binary
18591  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18592    # Keep paths in /bin as-is, but remove trailing .exe if any
18593    new_path="${new_path/%.exe/}"
18594    # Do not save /bin paths to all_fixpath_prefixes!
18595  else
18596    # Not in mixed or Windows style, start by that.
18597    new_path=`cmd //c echo $new_path`
18598
18599  input_path="$new_path"
18600  # Check if we need to convert this using DOS-style short mode. If the path
18601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18602  # take no chances and rewrite it.
18603  # Note: m4 eats our [], so we need to use [ and ] instead.
18604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18605  if test "x$has_forbidden_chars" != x; then
18606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18608  fi
18609
18610    # Output is in $new_path
18611
18612  windows_path="$new_path"
18613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18614    unix_path=`$CYGPATH -u "$windows_path"`
18615    new_path="$unix_path"
18616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18618    new_path="$unix_path"
18619  fi
18620
18621    # remove trailing .exe if any
18622    new_path="${new_path/%.exe/}"
18623
18624    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18625    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18626  fi
18627
18628    else
18629      # We're on a unix platform. Hooray! :)
18630      # First separate the path from the arguments. This will split at the first
18631      # space.
18632      complete="$FOUND_MAKE"
18633      path="${complete%% *}"
18634      tmp="$complete EOL"
18635      arguments="${tmp#* }"
18636
18637      # Cannot rely on the command "which" here since it doesn't always work.
18638      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18639      if test -z "$is_absolute_path"; then
18640        # Path to executable is not absolute. Find it.
18641        IFS_save="$IFS"
18642        IFS=:
18643        for p in $PATH; do
18644          if test -f "$p/$path" && test -x "$p/$path"; then
18645            new_path="$p/$path"
18646            break
18647          fi
18648        done
18649        IFS="$IFS_save"
18650      else
18651        # This is an absolute path, we can use it without further modifications.
18652        new_path="$path"
18653      fi
18654
18655      if test "x$new_path" = x; then
18656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18657$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18658        has_space=`$ECHO "$complete" | $GREP " "`
18659        if test "x$has_space" != x; then
18660          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18661$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18662        fi
18663        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18664      fi
18665    fi
18666
18667    # Now join together the path and the arguments once again
18668    if test "x$arguments" != xEOL; then
18669      new_complete="$new_path ${arguments% *}"
18670    else
18671      new_complete="$new_path"
18672    fi
18673
18674    if test "x$complete" != "x$new_complete"; then
18675      FOUND_MAKE="$new_complete"
18676      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18677$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18678    fi
18679  fi
18680
18681        fi
18682      fi
18683    fi
18684  fi
18685
18686        if test "x$FOUND_MAKE" = x; then
18687          for ac_prog in make
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18692$as_echo_n "checking for $ac_word... " >&6; }
18693if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18694  $as_echo_n "(cached) " >&6
18695else
18696  case $CHECK_TOOLSDIR_MAKE in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18702for as_dir in $PATH
18703do
18704  IFS=$as_save_IFS
18705  test -z "$as_dir" && as_dir=.
18706    for ac_exec_ext in '' $ac_executable_extensions; do
18707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18708    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18710    break 2
18711  fi
18712done
18713  done
18714IFS=$as_save_IFS
18715
18716  ;;
18717esac
18718fi
18719CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18720if test -n "$CHECK_TOOLSDIR_MAKE"; then
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18722$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18723else
18724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18725$as_echo "no" >&6; }
18726fi
18727
18728
18729  test -n "$CHECK_TOOLSDIR_MAKE" && break
18730done
18731
18732
18733  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18734  DESCRIPTION="make in tools-dir"
18735
18736  # On Cygwin, we require a newer version of make than on other platforms
18737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18738    MAKE_VERSION_EXPR="-e 4\."
18739    MAKE_REQUIRED_VERSION="4.0"
18740   else
18741    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18742    MAKE_REQUIRED_VERSION="3.81"
18743  fi
18744
18745  if test "x$MAKE_CANDIDATE" != x; then
18746    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18747$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18748    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18749    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18750    if test "x$IS_GNU_MAKE" = x; then
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18752$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18753    else
18754      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18755      if test "x$IS_MODERN_MAKE" = x; then
18756        { $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
18757$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;}
18758      else
18759        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18760          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18761            MAKE_EXPECTED_ENV='cygwin'
18762          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18763            MAKE_EXPECTED_ENV='msys'
18764          else
18765            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18766          fi
18767          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18768          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18769        else
18770          # Not relevant for non-Windows
18771          IS_MAKE_CORRECT_ENV=true
18772        fi
18773        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18774          { $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
18775$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;}
18776        else
18777          FOUND_MAKE=$MAKE_CANDIDATE
18778
18779  # Only process if variable expands to non-empty
18780
18781  if test "x$FOUND_MAKE" != x; then
18782    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18783
18784  # First separate the path from the arguments. This will split at the first
18785  # space.
18786  complete="$FOUND_MAKE"
18787  path="${complete%% *}"
18788  tmp="$complete EOL"
18789  arguments="${tmp#* }"
18790
18791  # Input might be given as Windows format, start by converting to
18792  # unix format.
18793  new_path=`$CYGPATH -u "$path"`
18794
18795  # Now try to locate executable using which
18796  new_path=`$WHICH "$new_path" 2> /dev/null`
18797  # bat and cmd files are not always considered executable in cygwin causing which
18798  # to not find them
18799  if test "x$new_path" = x \
18800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18802    new_path=`$CYGPATH -u "$path"`
18803  fi
18804  if test "x$new_path" = x; then
18805    # Oops. Which didn't find the executable.
18806    # The splitting of arguments from the executable at a space might have been incorrect,
18807    # since paths with space are more likely in Windows. Give it another try with the whole
18808    # argument.
18809    path="$complete"
18810    arguments="EOL"
18811    new_path=`$CYGPATH -u "$path"`
18812    new_path=`$WHICH "$new_path" 2> /dev/null`
18813    # bat and cmd files are not always considered executable in cygwin causing which
18814    # to not find them
18815    if test "x$new_path" = x \
18816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18818      new_path=`$CYGPATH -u "$path"`
18819    fi
18820    if test "x$new_path" = x; then
18821      # It's still not found. Now this is an unrecoverable error.
18822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18823$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18824      has_space=`$ECHO "$complete" | $GREP " "`
18825      if test "x$has_space" != x; then
18826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18828      fi
18829      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18830    fi
18831  fi
18832
18833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18836  # "foo.exe" is OK but "foo" is an error.
18837  #
18838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18839  # It is also a way to make sure we got the proper file name for the real test later on.
18840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18841  if test "x$test_shortpath" = x; then
18842    # Short path failed, file does not exist as specified.
18843    # Try adding .exe or .cmd
18844    if test -f "${new_path}.exe"; then
18845      input_to_shortpath="${new_path}.exe"
18846    elif test -f "${new_path}.cmd"; then
18847      input_to_shortpath="${new_path}.cmd"
18848    else
18849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18850$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18854    fi
18855  else
18856    input_to_shortpath="$new_path"
18857  fi
18858
18859  # Call helper function which possibly converts this using DOS-style short mode.
18860  # If so, the updated path is stored in $new_path.
18861  new_path="$input_to_shortpath"
18862
18863  input_path="$input_to_shortpath"
18864  # Check if we need to convert this using DOS-style short mode. If the path
18865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18866  # take no chances and rewrite it.
18867  # Note: m4 eats our [], so we need to use [ and ] instead.
18868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18869  if test "x$has_forbidden_chars" != x; then
18870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18874      # Going to short mode and back again did indeed matter. Since short mode is
18875      # case insensitive, let's make it lowercase to improve readability.
18876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18877      # Now convert it back to Unix-style (cygpath)
18878      input_path=`$CYGPATH -u "$shortmode_path"`
18879      new_path="$input_path"
18880    fi
18881  fi
18882
18883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18884  if test "x$test_cygdrive_prefix" = x; then
18885    # As a simple fix, exclude /usr/bin since it's not a real path.
18886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18888      # a path prefixed by /cygdrive for fixpath to work.
18889      new_path="$CYGWIN_ROOT_PATH$input_path"
18890    fi
18891  fi
18892
18893  # remove trailing .exe if any
18894  new_path="${new_path/%.exe/}"
18895
18896    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18897
18898  # First separate the path from the arguments. This will split at the first
18899  # space.
18900  complete="$FOUND_MAKE"
18901  path="${complete%% *}"
18902  tmp="$complete EOL"
18903  arguments="${tmp#* }"
18904
18905  # Input might be given as Windows format, start by converting to
18906  # unix format.
18907  new_path="$path"
18908
18909  windows_path="$new_path"
18910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18911    unix_path=`$CYGPATH -u "$windows_path"`
18912    new_path="$unix_path"
18913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18915    new_path="$unix_path"
18916  fi
18917
18918
18919  # Now try to locate executable using which
18920  new_path=`$WHICH "$new_path" 2> /dev/null`
18921
18922  if test "x$new_path" = x; then
18923    # Oops. Which didn't find the executable.
18924    # The splitting of arguments from the executable at a space might have been incorrect,
18925    # since paths with space are more likely in Windows. Give it another try with the whole
18926    # argument.
18927    path="$complete"
18928    arguments="EOL"
18929    new_path="$path"
18930
18931  windows_path="$new_path"
18932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18933    unix_path=`$CYGPATH -u "$windows_path"`
18934    new_path="$unix_path"
18935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18937    new_path="$unix_path"
18938  fi
18939
18940
18941    new_path=`$WHICH "$new_path" 2> /dev/null`
18942    # bat and cmd files are not always considered executable in MSYS causing which
18943    # to not find them
18944    if test "x$new_path" = x \
18945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18947      new_path="$path"
18948
18949  windows_path="$new_path"
18950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18951    unix_path=`$CYGPATH -u "$windows_path"`
18952    new_path="$unix_path"
18953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18955    new_path="$unix_path"
18956  fi
18957
18958    fi
18959
18960    if test "x$new_path" = x; then
18961      # It's still not found. Now this is an unrecoverable error.
18962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18963$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18964      has_space=`$ECHO "$complete" | $GREP " "`
18965      if test "x$has_space" != x; then
18966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18968      fi
18969      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18970    fi
18971  fi
18972
18973  # Now new_path has a complete unix path to the binary
18974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18975    # Keep paths in /bin as-is, but remove trailing .exe if any
18976    new_path="${new_path/%.exe/}"
18977    # Do not save /bin paths to all_fixpath_prefixes!
18978  else
18979    # Not in mixed or Windows style, start by that.
18980    new_path=`cmd //c echo $new_path`
18981
18982  input_path="$new_path"
18983  # Check if we need to convert this using DOS-style short mode. If the path
18984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18985  # take no chances and rewrite it.
18986  # Note: m4 eats our [], so we need to use [ and ] instead.
18987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18988  if test "x$has_forbidden_chars" != x; then
18989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18991  fi
18992
18993    # Output is in $new_path
18994
18995  windows_path="$new_path"
18996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18997    unix_path=`$CYGPATH -u "$windows_path"`
18998    new_path="$unix_path"
18999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19001    new_path="$unix_path"
19002  fi
19003
19004    # remove trailing .exe if any
19005    new_path="${new_path/%.exe/}"
19006
19007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19009  fi
19010
19011    else
19012      # We're on a unix platform. Hooray! :)
19013      # First separate the path from the arguments. This will split at the first
19014      # space.
19015      complete="$FOUND_MAKE"
19016      path="${complete%% *}"
19017      tmp="$complete EOL"
19018      arguments="${tmp#* }"
19019
19020      # Cannot rely on the command "which" here since it doesn't always work.
19021      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19022      if test -z "$is_absolute_path"; then
19023        # Path to executable is not absolute. Find it.
19024        IFS_save="$IFS"
19025        IFS=:
19026        for p in $PATH; do
19027          if test -f "$p/$path" && test -x "$p/$path"; then
19028            new_path="$p/$path"
19029            break
19030          fi
19031        done
19032        IFS="$IFS_save"
19033      else
19034        # This is an absolute path, we can use it without further modifications.
19035        new_path="$path"
19036      fi
19037
19038      if test "x$new_path" = x; then
19039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19040$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19041        has_space=`$ECHO "$complete" | $GREP " "`
19042        if test "x$has_space" != x; then
19043          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19045        fi
19046        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19047      fi
19048    fi
19049
19050    # Now join together the path and the arguments once again
19051    if test "x$arguments" != xEOL; then
19052      new_complete="$new_path ${arguments% *}"
19053    else
19054      new_complete="$new_path"
19055    fi
19056
19057    if test "x$complete" != "x$new_complete"; then
19058      FOUND_MAKE="$new_complete"
19059      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19060$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19061    fi
19062  fi
19063
19064        fi
19065      fi
19066    fi
19067  fi
19068
19069        fi
19070        PATH=$OLD_PATH
19071      fi
19072    fi
19073
19074    if test "x$FOUND_MAKE" = x; then
19075      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
19076    fi
19077
19078  else
19079    # The variable is set, but is it from the command line or the environment?
19080
19081    # Try to remove the string !MAKE! from our list.
19082    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19083    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19084      # If it failed, the variable was not from the command line. Ignore it,
19085      # but warn the user (except for BASH, which is always set by the calling BASH).
19086      if test "xMAKE" != xBASH; then
19087        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19088$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19089      fi
19090      # Try to locate tool using the code snippet
19091
19092    # Try our hardest to locate a correct version of GNU make
19093    for ac_prog in gmake
19094do
19095  # Extract the first word of "$ac_prog", so it can be a program name with args.
19096set dummy $ac_prog; ac_word=$2
19097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19098$as_echo_n "checking for $ac_word... " >&6; }
19099if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19100  $as_echo_n "(cached) " >&6
19101else
19102  case $CHECK_GMAKE in
19103  [\\/]* | ?:[\\/]*)
19104  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19105  ;;
19106  *)
19107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19108for as_dir in $PATH
19109do
19110  IFS=$as_save_IFS
19111  test -z "$as_dir" && as_dir=.
19112    for ac_exec_ext in '' $ac_executable_extensions; do
19113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19114    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19116    break 2
19117  fi
19118done
19119  done
19120IFS=$as_save_IFS
19121
19122  ;;
19123esac
19124fi
19125CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19126if test -n "$CHECK_GMAKE"; then
19127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19128$as_echo "$CHECK_GMAKE" >&6; }
19129else
19130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19131$as_echo "no" >&6; }
19132fi
19133
19134
19135  test -n "$CHECK_GMAKE" && break
19136done
19137
19138
19139  MAKE_CANDIDATE=""$CHECK_GMAKE""
19140  DESCRIPTION="gmake in PATH"
19141
19142  # On Cygwin, we require a newer version of make than on other platforms
19143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19144    MAKE_VERSION_EXPR="-e 4\."
19145    MAKE_REQUIRED_VERSION="4.0"
19146   else
19147    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19148    MAKE_REQUIRED_VERSION="3.81"
19149  fi
19150
19151  if test "x$MAKE_CANDIDATE" != x; then
19152    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19153$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19154    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19155    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19156    if test "x$IS_GNU_MAKE" = x; then
19157      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19158$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19159    else
19160      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19161      if test "x$IS_MODERN_MAKE" = x; then
19162        { $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
19163$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;}
19164      else
19165        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19166          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19167            MAKE_EXPECTED_ENV='cygwin'
19168          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19169            MAKE_EXPECTED_ENV='msys'
19170          else
19171            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19172          fi
19173          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19174          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19175        else
19176          # Not relevant for non-Windows
19177          IS_MAKE_CORRECT_ENV=true
19178        fi
19179        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19180          { $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
19181$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;}
19182        else
19183          FOUND_MAKE=$MAKE_CANDIDATE
19184
19185  # Only process if variable expands to non-empty
19186
19187  if test "x$FOUND_MAKE" != x; then
19188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19189
19190  # First separate the path from the arguments. This will split at the first
19191  # space.
19192  complete="$FOUND_MAKE"
19193  path="${complete%% *}"
19194  tmp="$complete EOL"
19195  arguments="${tmp#* }"
19196
19197  # Input might be given as Windows format, start by converting to
19198  # unix format.
19199  new_path=`$CYGPATH -u "$path"`
19200
19201  # Now try to locate executable using which
19202  new_path=`$WHICH "$new_path" 2> /dev/null`
19203  # bat and cmd files are not always considered executable in cygwin causing which
19204  # to not find them
19205  if test "x$new_path" = x \
19206      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19207      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19208    new_path=`$CYGPATH -u "$path"`
19209  fi
19210  if test "x$new_path" = x; then
19211    # Oops. Which didn't find the executable.
19212    # The splitting of arguments from the executable at a space might have been incorrect,
19213    # since paths with space are more likely in Windows. Give it another try with the whole
19214    # argument.
19215    path="$complete"
19216    arguments="EOL"
19217    new_path=`$CYGPATH -u "$path"`
19218    new_path=`$WHICH "$new_path" 2> /dev/null`
19219    # bat and cmd files are not always considered executable in cygwin causing which
19220    # to not find them
19221    if test "x$new_path" = x \
19222        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19223        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19224      new_path=`$CYGPATH -u "$path"`
19225    fi
19226    if test "x$new_path" = x; then
19227      # It's still not found. Now this is an unrecoverable error.
19228      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19229$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19230      has_space=`$ECHO "$complete" | $GREP " "`
19231      if test "x$has_space" != x; then
19232        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19233$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19234      fi
19235      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19236    fi
19237  fi
19238
19239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19242  # "foo.exe" is OK but "foo" is an error.
19243  #
19244  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19245  # It is also a way to make sure we got the proper file name for the real test later on.
19246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19247  if test "x$test_shortpath" = x; then
19248    # Short path failed, file does not exist as specified.
19249    # Try adding .exe or .cmd
19250    if test -f "${new_path}.exe"; then
19251      input_to_shortpath="${new_path}.exe"
19252    elif test -f "${new_path}.cmd"; then
19253      input_to_shortpath="${new_path}.cmd"
19254    else
19255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19258$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19259      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19260    fi
19261  else
19262    input_to_shortpath="$new_path"
19263  fi
19264
19265  # Call helper function which possibly converts this using DOS-style short mode.
19266  # If so, the updated path is stored in $new_path.
19267  new_path="$input_to_shortpath"
19268
19269  input_path="$input_to_shortpath"
19270  # Check if we need to convert this using DOS-style short mode. If the path
19271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19272  # take no chances and rewrite it.
19273  # Note: m4 eats our [], so we need to use [ and ] instead.
19274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19275  if test "x$has_forbidden_chars" != x; then
19276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19277    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19278    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19279    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19280      # Going to short mode and back again did indeed matter. Since short mode is
19281      # case insensitive, let's make it lowercase to improve readability.
19282      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19283      # Now convert it back to Unix-style (cygpath)
19284      input_path=`$CYGPATH -u "$shortmode_path"`
19285      new_path="$input_path"
19286    fi
19287  fi
19288
19289  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19290  if test "x$test_cygdrive_prefix" = x; then
19291    # As a simple fix, exclude /usr/bin since it's not a real path.
19292    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19293      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19294      # a path prefixed by /cygdrive for fixpath to work.
19295      new_path="$CYGWIN_ROOT_PATH$input_path"
19296    fi
19297  fi
19298
19299  # remove trailing .exe if any
19300  new_path="${new_path/%.exe/}"
19301
19302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19303
19304  # First separate the path from the arguments. This will split at the first
19305  # space.
19306  complete="$FOUND_MAKE"
19307  path="${complete%% *}"
19308  tmp="$complete EOL"
19309  arguments="${tmp#* }"
19310
19311  # Input might be given as Windows format, start by converting to
19312  # unix format.
19313  new_path="$path"
19314
19315  windows_path="$new_path"
19316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19317    unix_path=`$CYGPATH -u "$windows_path"`
19318    new_path="$unix_path"
19319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19320    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19321    new_path="$unix_path"
19322  fi
19323
19324
19325  # Now try to locate executable using which
19326  new_path=`$WHICH "$new_path" 2> /dev/null`
19327
19328  if test "x$new_path" = x; then
19329    # Oops. Which didn't find the executable.
19330    # The splitting of arguments from the executable at a space might have been incorrect,
19331    # since paths with space are more likely in Windows. Give it another try with the whole
19332    # argument.
19333    path="$complete"
19334    arguments="EOL"
19335    new_path="$path"
19336
19337  windows_path="$new_path"
19338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19339    unix_path=`$CYGPATH -u "$windows_path"`
19340    new_path="$unix_path"
19341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19343    new_path="$unix_path"
19344  fi
19345
19346
19347    new_path=`$WHICH "$new_path" 2> /dev/null`
19348    # bat and cmd files are not always considered executable in MSYS causing which
19349    # to not find them
19350    if test "x$new_path" = x \
19351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19353      new_path="$path"
19354
19355  windows_path="$new_path"
19356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19357    unix_path=`$CYGPATH -u "$windows_path"`
19358    new_path="$unix_path"
19359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19361    new_path="$unix_path"
19362  fi
19363
19364    fi
19365
19366    if test "x$new_path" = x; then
19367      # It's still not found. Now this is an unrecoverable error.
19368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19369$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19370      has_space=`$ECHO "$complete" | $GREP " "`
19371      if test "x$has_space" != x; then
19372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19374      fi
19375      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19376    fi
19377  fi
19378
19379  # Now new_path has a complete unix path to the binary
19380  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19381    # Keep paths in /bin as-is, but remove trailing .exe if any
19382    new_path="${new_path/%.exe/}"
19383    # Do not save /bin paths to all_fixpath_prefixes!
19384  else
19385    # Not in mixed or Windows style, start by that.
19386    new_path=`cmd //c echo $new_path`
19387
19388  input_path="$new_path"
19389  # Check if we need to convert this using DOS-style short mode. If the path
19390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19391  # take no chances and rewrite it.
19392  # Note: m4 eats our [], so we need to use [ and ] instead.
19393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19394  if test "x$has_forbidden_chars" != x; then
19395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19397  fi
19398
19399    # Output is in $new_path
19400
19401  windows_path="$new_path"
19402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19403    unix_path=`$CYGPATH -u "$windows_path"`
19404    new_path="$unix_path"
19405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19407    new_path="$unix_path"
19408  fi
19409
19410    # remove trailing .exe if any
19411    new_path="${new_path/%.exe/}"
19412
19413    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19414    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19415  fi
19416
19417    else
19418      # We're on a unix platform. Hooray! :)
19419      # First separate the path from the arguments. This will split at the first
19420      # space.
19421      complete="$FOUND_MAKE"
19422      path="${complete%% *}"
19423      tmp="$complete EOL"
19424      arguments="${tmp#* }"
19425
19426      # Cannot rely on the command "which" here since it doesn't always work.
19427      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19428      if test -z "$is_absolute_path"; then
19429        # Path to executable is not absolute. Find it.
19430        IFS_save="$IFS"
19431        IFS=:
19432        for p in $PATH; do
19433          if test -f "$p/$path" && test -x "$p/$path"; then
19434            new_path="$p/$path"
19435            break
19436          fi
19437        done
19438        IFS="$IFS_save"
19439      else
19440        # This is an absolute path, we can use it without further modifications.
19441        new_path="$path"
19442      fi
19443
19444      if test "x$new_path" = x; then
19445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19446$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19447        has_space=`$ECHO "$complete" | $GREP " "`
19448        if test "x$has_space" != x; then
19449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19451        fi
19452        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19453      fi
19454    fi
19455
19456    # Now join together the path and the arguments once again
19457    if test "x$arguments" != xEOL; then
19458      new_complete="$new_path ${arguments% *}"
19459    else
19460      new_complete="$new_path"
19461    fi
19462
19463    if test "x$complete" != "x$new_complete"; then
19464      FOUND_MAKE="$new_complete"
19465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19466$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19467    fi
19468  fi
19469
19470        fi
19471      fi
19472    fi
19473  fi
19474
19475
19476    if test "x$FOUND_MAKE" = x; then
19477      for ac_prog in make
19478do
19479  # Extract the first word of "$ac_prog", so it can be a program name with args.
19480set dummy $ac_prog; ac_word=$2
19481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482$as_echo_n "checking for $ac_word... " >&6; }
19483if ${ac_cv_path_CHECK_MAKE+:} false; then :
19484  $as_echo_n "(cached) " >&6
19485else
19486  case $CHECK_MAKE in
19487  [\\/]* | ?:[\\/]*)
19488  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19489  ;;
19490  *)
19491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492for as_dir in $PATH
19493do
19494  IFS=$as_save_IFS
19495  test -z "$as_dir" && as_dir=.
19496    for ac_exec_ext in '' $ac_executable_extensions; do
19497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19498    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19500    break 2
19501  fi
19502done
19503  done
19504IFS=$as_save_IFS
19505
19506  ;;
19507esac
19508fi
19509CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19510if test -n "$CHECK_MAKE"; then
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19512$as_echo "$CHECK_MAKE" >&6; }
19513else
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19515$as_echo "no" >&6; }
19516fi
19517
19518
19519  test -n "$CHECK_MAKE" && break
19520done
19521
19522
19523  MAKE_CANDIDATE=""$CHECK_MAKE""
19524  DESCRIPTION="make in PATH"
19525
19526  # On Cygwin, we require a newer version of make than on other platforms
19527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19528    MAKE_VERSION_EXPR="-e 4\."
19529    MAKE_REQUIRED_VERSION="4.0"
19530   else
19531    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19532    MAKE_REQUIRED_VERSION="3.81"
19533  fi
19534
19535  if test "x$MAKE_CANDIDATE" != x; then
19536    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19537$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19538    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19539    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19540    if test "x$IS_GNU_MAKE" = x; then
19541      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19542$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19543    else
19544      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19545      if test "x$IS_MODERN_MAKE" = x; then
19546        { $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
19547$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;}
19548      else
19549        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19550          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19551            MAKE_EXPECTED_ENV='cygwin'
19552          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19553            MAKE_EXPECTED_ENV='msys'
19554          else
19555            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19556          fi
19557          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19558          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19559        else
19560          # Not relevant for non-Windows
19561          IS_MAKE_CORRECT_ENV=true
19562        fi
19563        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19564          { $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
19565$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;}
19566        else
19567          FOUND_MAKE=$MAKE_CANDIDATE
19568
19569  # Only process if variable expands to non-empty
19570
19571  if test "x$FOUND_MAKE" != x; then
19572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19573
19574  # First separate the path from the arguments. This will split at the first
19575  # space.
19576  complete="$FOUND_MAKE"
19577  path="${complete%% *}"
19578  tmp="$complete EOL"
19579  arguments="${tmp#* }"
19580
19581  # Input might be given as Windows format, start by converting to
19582  # unix format.
19583  new_path=`$CYGPATH -u "$path"`
19584
19585  # Now try to locate executable using which
19586  new_path=`$WHICH "$new_path" 2> /dev/null`
19587  # bat and cmd files are not always considered executable in cygwin causing which
19588  # to not find them
19589  if test "x$new_path" = x \
19590      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19591      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19592    new_path=`$CYGPATH -u "$path"`
19593  fi
19594  if test "x$new_path" = x; then
19595    # Oops. Which didn't find the executable.
19596    # The splitting of arguments from the executable at a space might have been incorrect,
19597    # since paths with space are more likely in Windows. Give it another try with the whole
19598    # argument.
19599    path="$complete"
19600    arguments="EOL"
19601    new_path=`$CYGPATH -u "$path"`
19602    new_path=`$WHICH "$new_path" 2> /dev/null`
19603    # bat and cmd files are not always considered executable in cygwin causing which
19604    # to not find them
19605    if test "x$new_path" = x \
19606        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19607        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19608      new_path=`$CYGPATH -u "$path"`
19609    fi
19610    if test "x$new_path" = x; then
19611      # It's still not found. Now this is an unrecoverable error.
19612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19614      has_space=`$ECHO "$complete" | $GREP " "`
19615      if test "x$has_space" != x; then
19616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19618      fi
19619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19620    fi
19621  fi
19622
19623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19626  # "foo.exe" is OK but "foo" is an error.
19627  #
19628  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19629  # It is also a way to make sure we got the proper file name for the real test later on.
19630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19631  if test "x$test_shortpath" = x; then
19632    # Short path failed, file does not exist as specified.
19633    # Try adding .exe or .cmd
19634    if test -f "${new_path}.exe"; then
19635      input_to_shortpath="${new_path}.exe"
19636    elif test -f "${new_path}.cmd"; then
19637      input_to_shortpath="${new_path}.cmd"
19638    else
19639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19644    fi
19645  else
19646    input_to_shortpath="$new_path"
19647  fi
19648
19649  # Call helper function which possibly converts this using DOS-style short mode.
19650  # If so, the updated path is stored in $new_path.
19651  new_path="$input_to_shortpath"
19652
19653  input_path="$input_to_shortpath"
19654  # Check if we need to convert this using DOS-style short mode. If the path
19655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19656  # take no chances and rewrite it.
19657  # Note: m4 eats our [], so we need to use [ and ] instead.
19658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19659  if test "x$has_forbidden_chars" != x; then
19660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19664      # Going to short mode and back again did indeed matter. Since short mode is
19665      # case insensitive, let's make it lowercase to improve readability.
19666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19667      # Now convert it back to Unix-style (cygpath)
19668      input_path=`$CYGPATH -u "$shortmode_path"`
19669      new_path="$input_path"
19670    fi
19671  fi
19672
19673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19674  if test "x$test_cygdrive_prefix" = x; then
19675    # As a simple fix, exclude /usr/bin since it's not a real path.
19676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19678      # a path prefixed by /cygdrive for fixpath to work.
19679      new_path="$CYGWIN_ROOT_PATH$input_path"
19680    fi
19681  fi
19682
19683  # remove trailing .exe if any
19684  new_path="${new_path/%.exe/}"
19685
19686    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19687
19688  # First separate the path from the arguments. This will split at the first
19689  # space.
19690  complete="$FOUND_MAKE"
19691  path="${complete%% *}"
19692  tmp="$complete EOL"
19693  arguments="${tmp#* }"
19694
19695  # Input might be given as Windows format, start by converting to
19696  # unix format.
19697  new_path="$path"
19698
19699  windows_path="$new_path"
19700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19701    unix_path=`$CYGPATH -u "$windows_path"`
19702    new_path="$unix_path"
19703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19705    new_path="$unix_path"
19706  fi
19707
19708
19709  # Now try to locate executable using which
19710  new_path=`$WHICH "$new_path" 2> /dev/null`
19711
19712  if test "x$new_path" = x; then
19713    # Oops. Which didn't find the executable.
19714    # The splitting of arguments from the executable at a space might have been incorrect,
19715    # since paths with space are more likely in Windows. Give it another try with the whole
19716    # argument.
19717    path="$complete"
19718    arguments="EOL"
19719    new_path="$path"
19720
19721  windows_path="$new_path"
19722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19723    unix_path=`$CYGPATH -u "$windows_path"`
19724    new_path="$unix_path"
19725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19727    new_path="$unix_path"
19728  fi
19729
19730
19731    new_path=`$WHICH "$new_path" 2> /dev/null`
19732    # bat and cmd files are not always considered executable in MSYS causing which
19733    # to not find them
19734    if test "x$new_path" = x \
19735        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19736        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19737      new_path="$path"
19738
19739  windows_path="$new_path"
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741    unix_path=`$CYGPATH -u "$windows_path"`
19742    new_path="$unix_path"
19743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19745    new_path="$unix_path"
19746  fi
19747
19748    fi
19749
19750    if test "x$new_path" = x; then
19751      # It's still not found. Now this is an unrecoverable error.
19752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19754      has_space=`$ECHO "$complete" | $GREP " "`
19755      if test "x$has_space" != x; then
19756        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19757$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19758      fi
19759      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19760    fi
19761  fi
19762
19763  # Now new_path has a complete unix path to the binary
19764  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19765    # Keep paths in /bin as-is, but remove trailing .exe if any
19766    new_path="${new_path/%.exe/}"
19767    # Do not save /bin paths to all_fixpath_prefixes!
19768  else
19769    # Not in mixed or Windows style, start by that.
19770    new_path=`cmd //c echo $new_path`
19771
19772  input_path="$new_path"
19773  # Check if we need to convert this using DOS-style short mode. If the path
19774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19775  # take no chances and rewrite it.
19776  # Note: m4 eats our [], so we need to use [ and ] instead.
19777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19778  if test "x$has_forbidden_chars" != x; then
19779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19781  fi
19782
19783    # Output is in $new_path
19784
19785  windows_path="$new_path"
19786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19787    unix_path=`$CYGPATH -u "$windows_path"`
19788    new_path="$unix_path"
19789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19791    new_path="$unix_path"
19792  fi
19793
19794    # remove trailing .exe if any
19795    new_path="${new_path/%.exe/}"
19796
19797    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19798    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19799  fi
19800
19801    else
19802      # We're on a unix platform. Hooray! :)
19803      # First separate the path from the arguments. This will split at the first
19804      # space.
19805      complete="$FOUND_MAKE"
19806      path="${complete%% *}"
19807      tmp="$complete EOL"
19808      arguments="${tmp#* }"
19809
19810      # Cannot rely on the command "which" here since it doesn't always work.
19811      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19812      if test -z "$is_absolute_path"; then
19813        # Path to executable is not absolute. Find it.
19814        IFS_save="$IFS"
19815        IFS=:
19816        for p in $PATH; do
19817          if test -f "$p/$path" && test -x "$p/$path"; then
19818            new_path="$p/$path"
19819            break
19820          fi
19821        done
19822        IFS="$IFS_save"
19823      else
19824        # This is an absolute path, we can use it without further modifications.
19825        new_path="$path"
19826      fi
19827
19828      if test "x$new_path" = x; then
19829        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19830$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19831        has_space=`$ECHO "$complete" | $GREP " "`
19832        if test "x$has_space" != x; then
19833          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19834$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19835        fi
19836        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19837      fi
19838    fi
19839
19840    # Now join together the path and the arguments once again
19841    if test "x$arguments" != xEOL; then
19842      new_complete="$new_path ${arguments% *}"
19843    else
19844      new_complete="$new_path"
19845    fi
19846
19847    if test "x$complete" != "x$new_complete"; then
19848      FOUND_MAKE="$new_complete"
19849      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19850$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19851    fi
19852  fi
19853
19854        fi
19855      fi
19856    fi
19857  fi
19858
19859    fi
19860
19861    if test "x$FOUND_MAKE" = x; then
19862      if test "x$TOOLCHAIN_PATH" != x; then
19863        # We have a toolchain path, check that as well before giving up.
19864        OLD_PATH=$PATH
19865        PATH=$TOOLCHAIN_PATH:$PATH
19866        for ac_prog in gmake
19867do
19868  # Extract the first word of "$ac_prog", so it can be a program name with args.
19869set dummy $ac_prog; ac_word=$2
19870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19871$as_echo_n "checking for $ac_word... " >&6; }
19872if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19873  $as_echo_n "(cached) " >&6
19874else
19875  case $CHECK_TOOLSDIR_GMAKE in
19876  [\\/]* | ?:[\\/]*)
19877  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19878  ;;
19879  *)
19880  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19881for as_dir in $PATH
19882do
19883  IFS=$as_save_IFS
19884  test -z "$as_dir" && as_dir=.
19885    for ac_exec_ext in '' $ac_executable_extensions; do
19886  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19887    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19889    break 2
19890  fi
19891done
19892  done
19893IFS=$as_save_IFS
19894
19895  ;;
19896esac
19897fi
19898CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19899if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19901$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19902else
19903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19904$as_echo "no" >&6; }
19905fi
19906
19907
19908  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19909done
19910
19911
19912  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19913  DESCRIPTION="gmake in tools-dir"
19914
19915  # On Cygwin, we require a newer version of make than on other platforms
19916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19917    MAKE_VERSION_EXPR="-e 4\."
19918    MAKE_REQUIRED_VERSION="4.0"
19919   else
19920    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19921    MAKE_REQUIRED_VERSION="3.81"
19922  fi
19923
19924  if test "x$MAKE_CANDIDATE" != x; then
19925    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19926$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19927    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19928    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19929    if test "x$IS_GNU_MAKE" = x; then
19930      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19931$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19932    else
19933      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19934      if test "x$IS_MODERN_MAKE" = x; then
19935        { $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
19936$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;}
19937      else
19938        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19939          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19940            MAKE_EXPECTED_ENV='cygwin'
19941          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19942            MAKE_EXPECTED_ENV='msys'
19943          else
19944            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19945          fi
19946          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19947          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19948        else
19949          # Not relevant for non-Windows
19950          IS_MAKE_CORRECT_ENV=true
19951        fi
19952        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19953          { $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
19954$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;}
19955        else
19956          FOUND_MAKE=$MAKE_CANDIDATE
19957
19958  # Only process if variable expands to non-empty
19959
19960  if test "x$FOUND_MAKE" != x; then
19961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962
19963  # First separate the path from the arguments. This will split at the first
19964  # space.
19965  complete="$FOUND_MAKE"
19966  path="${complete%% *}"
19967  tmp="$complete EOL"
19968  arguments="${tmp#* }"
19969
19970  # Input might be given as Windows format, start by converting to
19971  # unix format.
19972  new_path=`$CYGPATH -u "$path"`
19973
19974  # Now try to locate executable using which
19975  new_path=`$WHICH "$new_path" 2> /dev/null`
19976  # bat and cmd files are not always considered executable in cygwin causing which
19977  # to not find them
19978  if test "x$new_path" = x \
19979      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19980      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19981    new_path=`$CYGPATH -u "$path"`
19982  fi
19983  if test "x$new_path" = x; then
19984    # Oops. Which didn't find the executable.
19985    # The splitting of arguments from the executable at a space might have been incorrect,
19986    # since paths with space are more likely in Windows. Give it another try with the whole
19987    # argument.
19988    path="$complete"
19989    arguments="EOL"
19990    new_path=`$CYGPATH -u "$path"`
19991    new_path=`$WHICH "$new_path" 2> /dev/null`
19992    # bat and cmd files are not always considered executable in cygwin causing which
19993    # to not find them
19994    if test "x$new_path" = x \
19995        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19996        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19997      new_path=`$CYGPATH -u "$path"`
19998    fi
19999    if test "x$new_path" = x; then
20000      # It's still not found. Now this is an unrecoverable error.
20001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20002$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20003      has_space=`$ECHO "$complete" | $GREP " "`
20004      if test "x$has_space" != x; then
20005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20007      fi
20008      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20009    fi
20010  fi
20011
20012  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20013  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20014  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20015  # "foo.exe" is OK but "foo" is an error.
20016  #
20017  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20018  # It is also a way to make sure we got the proper file name for the real test later on.
20019  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20020  if test "x$test_shortpath" = x; then
20021    # Short path failed, file does not exist as specified.
20022    # Try adding .exe or .cmd
20023    if test -f "${new_path}.exe"; then
20024      input_to_shortpath="${new_path}.exe"
20025    elif test -f "${new_path}.cmd"; then
20026      input_to_shortpath="${new_path}.cmd"
20027    else
20028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20031$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20032      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20033    fi
20034  else
20035    input_to_shortpath="$new_path"
20036  fi
20037
20038  # Call helper function which possibly converts this using DOS-style short mode.
20039  # If so, the updated path is stored in $new_path.
20040  new_path="$input_to_shortpath"
20041
20042  input_path="$input_to_shortpath"
20043  # Check if we need to convert this using DOS-style short mode. If the path
20044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20045  # take no chances and rewrite it.
20046  # Note: m4 eats our [], so we need to use [ and ] instead.
20047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20048  if test "x$has_forbidden_chars" != x; then
20049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20053      # Going to short mode and back again did indeed matter. Since short mode is
20054      # case insensitive, let's make it lowercase to improve readability.
20055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20056      # Now convert it back to Unix-style (cygpath)
20057      input_path=`$CYGPATH -u "$shortmode_path"`
20058      new_path="$input_path"
20059    fi
20060  fi
20061
20062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20063  if test "x$test_cygdrive_prefix" = x; then
20064    # As a simple fix, exclude /usr/bin since it's not a real path.
20065    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20067      # a path prefixed by /cygdrive for fixpath to work.
20068      new_path="$CYGWIN_ROOT_PATH$input_path"
20069    fi
20070  fi
20071
20072  # remove trailing .exe if any
20073  new_path="${new_path/%.exe/}"
20074
20075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20076
20077  # First separate the path from the arguments. This will split at the first
20078  # space.
20079  complete="$FOUND_MAKE"
20080  path="${complete%% *}"
20081  tmp="$complete EOL"
20082  arguments="${tmp#* }"
20083
20084  # Input might be given as Windows format, start by converting to
20085  # unix format.
20086  new_path="$path"
20087
20088  windows_path="$new_path"
20089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20090    unix_path=`$CYGPATH -u "$windows_path"`
20091    new_path="$unix_path"
20092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20094    new_path="$unix_path"
20095  fi
20096
20097
20098  # Now try to locate executable using which
20099  new_path=`$WHICH "$new_path" 2> /dev/null`
20100
20101  if test "x$new_path" = x; then
20102    # Oops. Which didn't find the executable.
20103    # The splitting of arguments from the executable at a space might have been incorrect,
20104    # since paths with space are more likely in Windows. Give it another try with the whole
20105    # argument.
20106    path="$complete"
20107    arguments="EOL"
20108    new_path="$path"
20109
20110  windows_path="$new_path"
20111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20112    unix_path=`$CYGPATH -u "$windows_path"`
20113    new_path="$unix_path"
20114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20116    new_path="$unix_path"
20117  fi
20118
20119
20120    new_path=`$WHICH "$new_path" 2> /dev/null`
20121    # bat and cmd files are not always considered executable in MSYS causing which
20122    # to not find them
20123    if test "x$new_path" = x \
20124        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20125        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20126      new_path="$path"
20127
20128  windows_path="$new_path"
20129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20130    unix_path=`$CYGPATH -u "$windows_path"`
20131    new_path="$unix_path"
20132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20134    new_path="$unix_path"
20135  fi
20136
20137    fi
20138
20139    if test "x$new_path" = x; then
20140      # It's still not found. Now this is an unrecoverable error.
20141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20142$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20143      has_space=`$ECHO "$complete" | $GREP " "`
20144      if test "x$has_space" != x; then
20145        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20146$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20147      fi
20148      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20149    fi
20150  fi
20151
20152  # Now new_path has a complete unix path to the binary
20153  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20154    # Keep paths in /bin as-is, but remove trailing .exe if any
20155    new_path="${new_path/%.exe/}"
20156    # Do not save /bin paths to all_fixpath_prefixes!
20157  else
20158    # Not in mixed or Windows style, start by that.
20159    new_path=`cmd //c echo $new_path`
20160
20161  input_path="$new_path"
20162  # Check if we need to convert this using DOS-style short mode. If the path
20163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20164  # take no chances and rewrite it.
20165  # Note: m4 eats our [], so we need to use [ and ] instead.
20166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20167  if test "x$has_forbidden_chars" != x; then
20168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20170  fi
20171
20172    # Output is in $new_path
20173
20174  windows_path="$new_path"
20175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20176    unix_path=`$CYGPATH -u "$windows_path"`
20177    new_path="$unix_path"
20178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20180    new_path="$unix_path"
20181  fi
20182
20183    # remove trailing .exe if any
20184    new_path="${new_path/%.exe/}"
20185
20186    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20187    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20188  fi
20189
20190    else
20191      # We're on a unix platform. Hooray! :)
20192      # First separate the path from the arguments. This will split at the first
20193      # space.
20194      complete="$FOUND_MAKE"
20195      path="${complete%% *}"
20196      tmp="$complete EOL"
20197      arguments="${tmp#* }"
20198
20199      # Cannot rely on the command "which" here since it doesn't always work.
20200      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20201      if test -z "$is_absolute_path"; then
20202        # Path to executable is not absolute. Find it.
20203        IFS_save="$IFS"
20204        IFS=:
20205        for p in $PATH; do
20206          if test -f "$p/$path" && test -x "$p/$path"; then
20207            new_path="$p/$path"
20208            break
20209          fi
20210        done
20211        IFS="$IFS_save"
20212      else
20213        # This is an absolute path, we can use it without further modifications.
20214        new_path="$path"
20215      fi
20216
20217      if test "x$new_path" = x; then
20218        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20219$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20220        has_space=`$ECHO "$complete" | $GREP " "`
20221        if test "x$has_space" != x; then
20222          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20223$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20224        fi
20225        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20226      fi
20227    fi
20228
20229    # Now join together the path and the arguments once again
20230    if test "x$arguments" != xEOL; then
20231      new_complete="$new_path ${arguments% *}"
20232    else
20233      new_complete="$new_path"
20234    fi
20235
20236    if test "x$complete" != "x$new_complete"; then
20237      FOUND_MAKE="$new_complete"
20238      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20239$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20240    fi
20241  fi
20242
20243        fi
20244      fi
20245    fi
20246  fi
20247
20248        if test "x$FOUND_MAKE" = x; then
20249          for ac_prog in make
20250do
20251  # Extract the first word of "$ac_prog", so it can be a program name with args.
20252set dummy $ac_prog; ac_word=$2
20253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20254$as_echo_n "checking for $ac_word... " >&6; }
20255if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20256  $as_echo_n "(cached) " >&6
20257else
20258  case $CHECK_TOOLSDIR_MAKE in
20259  [\\/]* | ?:[\\/]*)
20260  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20261  ;;
20262  *)
20263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20264for as_dir in $PATH
20265do
20266  IFS=$as_save_IFS
20267  test -z "$as_dir" && as_dir=.
20268    for ac_exec_ext in '' $ac_executable_extensions; do
20269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20270    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20272    break 2
20273  fi
20274done
20275  done
20276IFS=$as_save_IFS
20277
20278  ;;
20279esac
20280fi
20281CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20282if test -n "$CHECK_TOOLSDIR_MAKE"; then
20283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20284$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20285else
20286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20287$as_echo "no" >&6; }
20288fi
20289
20290
20291  test -n "$CHECK_TOOLSDIR_MAKE" && break
20292done
20293
20294
20295  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20296  DESCRIPTION="make in tools-dir"
20297
20298  # On Cygwin, we require a newer version of make than on other platforms
20299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20300    MAKE_VERSION_EXPR="-e 4\."
20301    MAKE_REQUIRED_VERSION="4.0"
20302   else
20303    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20304    MAKE_REQUIRED_VERSION="3.81"
20305  fi
20306
20307  if test "x$MAKE_CANDIDATE" != x; then
20308    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20309$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20310    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20311    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20312    if test "x$IS_GNU_MAKE" = x; then
20313      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20314$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20315    else
20316      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20317      if test "x$IS_MODERN_MAKE" = x; then
20318        { $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
20319$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;}
20320      else
20321        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20322          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20323            MAKE_EXPECTED_ENV='cygwin'
20324          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20325            MAKE_EXPECTED_ENV='msys'
20326          else
20327            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20328          fi
20329          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20330          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20331        else
20332          # Not relevant for non-Windows
20333          IS_MAKE_CORRECT_ENV=true
20334        fi
20335        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20336          { $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
20337$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;}
20338        else
20339          FOUND_MAKE=$MAKE_CANDIDATE
20340
20341  # Only process if variable expands to non-empty
20342
20343  if test "x$FOUND_MAKE" != x; then
20344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20345
20346  # First separate the path from the arguments. This will split at the first
20347  # space.
20348  complete="$FOUND_MAKE"
20349  path="${complete%% *}"
20350  tmp="$complete EOL"
20351  arguments="${tmp#* }"
20352
20353  # Input might be given as Windows format, start by converting to
20354  # unix format.
20355  new_path=`$CYGPATH -u "$path"`
20356
20357  # Now try to locate executable using which
20358  new_path=`$WHICH "$new_path" 2> /dev/null`
20359  # bat and cmd files are not always considered executable in cygwin causing which
20360  # to not find them
20361  if test "x$new_path" = x \
20362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20364    new_path=`$CYGPATH -u "$path"`
20365  fi
20366  if test "x$new_path" = x; then
20367    # Oops. Which didn't find the executable.
20368    # The splitting of arguments from the executable at a space might have been incorrect,
20369    # since paths with space are more likely in Windows. Give it another try with the whole
20370    # argument.
20371    path="$complete"
20372    arguments="EOL"
20373    new_path=`$CYGPATH -u "$path"`
20374    new_path=`$WHICH "$new_path" 2> /dev/null`
20375    # bat and cmd files are not always considered executable in cygwin causing which
20376    # to not find them
20377    if test "x$new_path" = x \
20378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20380      new_path=`$CYGPATH -u "$path"`
20381    fi
20382    if test "x$new_path" = x; then
20383      # It's still not found. Now this is an unrecoverable error.
20384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20385$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20386      has_space=`$ECHO "$complete" | $GREP " "`
20387      if test "x$has_space" != x; then
20388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20390      fi
20391      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20392    fi
20393  fi
20394
20395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20398  # "foo.exe" is OK but "foo" is an error.
20399  #
20400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20401  # It is also a way to make sure we got the proper file name for the real test later on.
20402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20403  if test "x$test_shortpath" = x; then
20404    # Short path failed, file does not exist as specified.
20405    # Try adding .exe or .cmd
20406    if test -f "${new_path}.exe"; then
20407      input_to_shortpath="${new_path}.exe"
20408    elif test -f "${new_path}.cmd"; then
20409      input_to_shortpath="${new_path}.cmd"
20410    else
20411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20412$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20415      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20416    fi
20417  else
20418    input_to_shortpath="$new_path"
20419  fi
20420
20421  # Call helper function which possibly converts this using DOS-style short mode.
20422  # If so, the updated path is stored in $new_path.
20423  new_path="$input_to_shortpath"
20424
20425  input_path="$input_to_shortpath"
20426  # Check if we need to convert this using DOS-style short mode. If the path
20427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428  # take no chances and rewrite it.
20429  # Note: m4 eats our [], so we need to use [ and ] instead.
20430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20431  if test "x$has_forbidden_chars" != x; then
20432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20436      # Going to short mode and back again did indeed matter. Since short mode is
20437      # case insensitive, let's make it lowercase to improve readability.
20438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20439      # Now convert it back to Unix-style (cygpath)
20440      input_path=`$CYGPATH -u "$shortmode_path"`
20441      new_path="$input_path"
20442    fi
20443  fi
20444
20445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20446  if test "x$test_cygdrive_prefix" = x; then
20447    # As a simple fix, exclude /usr/bin since it's not a real path.
20448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20450      # a path prefixed by /cygdrive for fixpath to work.
20451      new_path="$CYGWIN_ROOT_PATH$input_path"
20452    fi
20453  fi
20454
20455  # remove trailing .exe if any
20456  new_path="${new_path/%.exe/}"
20457
20458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20459
20460  # First separate the path from the arguments. This will split at the first
20461  # space.
20462  complete="$FOUND_MAKE"
20463  path="${complete%% *}"
20464  tmp="$complete EOL"
20465  arguments="${tmp#* }"
20466
20467  # Input might be given as Windows format, start by converting to
20468  # unix format.
20469  new_path="$path"
20470
20471  windows_path="$new_path"
20472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20473    unix_path=`$CYGPATH -u "$windows_path"`
20474    new_path="$unix_path"
20475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20477    new_path="$unix_path"
20478  fi
20479
20480
20481  # Now try to locate executable using which
20482  new_path=`$WHICH "$new_path" 2> /dev/null`
20483
20484  if test "x$new_path" = x; then
20485    # Oops. Which didn't find the executable.
20486    # The splitting of arguments from the executable at a space might have been incorrect,
20487    # since paths with space are more likely in Windows. Give it another try with the whole
20488    # argument.
20489    path="$complete"
20490    arguments="EOL"
20491    new_path="$path"
20492
20493  windows_path="$new_path"
20494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20495    unix_path=`$CYGPATH -u "$windows_path"`
20496    new_path="$unix_path"
20497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20499    new_path="$unix_path"
20500  fi
20501
20502
20503    new_path=`$WHICH "$new_path" 2> /dev/null`
20504    # bat and cmd files are not always considered executable in MSYS causing which
20505    # to not find them
20506    if test "x$new_path" = x \
20507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20509      new_path="$path"
20510
20511  windows_path="$new_path"
20512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20513    unix_path=`$CYGPATH -u "$windows_path"`
20514    new_path="$unix_path"
20515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20517    new_path="$unix_path"
20518  fi
20519
20520    fi
20521
20522    if test "x$new_path" = x; then
20523      # It's still not found. Now this is an unrecoverable error.
20524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20525$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20526      has_space=`$ECHO "$complete" | $GREP " "`
20527      if test "x$has_space" != x; then
20528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20530      fi
20531      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20532    fi
20533  fi
20534
20535  # Now new_path has a complete unix path to the binary
20536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20537    # Keep paths in /bin as-is, but remove trailing .exe if any
20538    new_path="${new_path/%.exe/}"
20539    # Do not save /bin paths to all_fixpath_prefixes!
20540  else
20541    # Not in mixed or Windows style, start by that.
20542    new_path=`cmd //c echo $new_path`
20543
20544  input_path="$new_path"
20545  # Check if we need to convert this using DOS-style short mode. If the path
20546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20547  # take no chances and rewrite it.
20548  # Note: m4 eats our [], so we need to use [ and ] instead.
20549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20550  if test "x$has_forbidden_chars" != x; then
20551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20553  fi
20554
20555    # Output is in $new_path
20556
20557  windows_path="$new_path"
20558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20559    unix_path=`$CYGPATH -u "$windows_path"`
20560    new_path="$unix_path"
20561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20563    new_path="$unix_path"
20564  fi
20565
20566    # remove trailing .exe if any
20567    new_path="${new_path/%.exe/}"
20568
20569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20571  fi
20572
20573    else
20574      # We're on a unix platform. Hooray! :)
20575      # First separate the path from the arguments. This will split at the first
20576      # space.
20577      complete="$FOUND_MAKE"
20578      path="${complete%% *}"
20579      tmp="$complete EOL"
20580      arguments="${tmp#* }"
20581
20582      # Cannot rely on the command "which" here since it doesn't always work.
20583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20584      if test -z "$is_absolute_path"; then
20585        # Path to executable is not absolute. Find it.
20586        IFS_save="$IFS"
20587        IFS=:
20588        for p in $PATH; do
20589          if test -f "$p/$path" && test -x "$p/$path"; then
20590            new_path="$p/$path"
20591            break
20592          fi
20593        done
20594        IFS="$IFS_save"
20595      else
20596        # This is an absolute path, we can use it without further modifications.
20597        new_path="$path"
20598      fi
20599
20600      if test "x$new_path" = x; then
20601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20603        has_space=`$ECHO "$complete" | $GREP " "`
20604        if test "x$has_space" != x; then
20605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20607        fi
20608        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20609      fi
20610    fi
20611
20612    # Now join together the path and the arguments once again
20613    if test "x$arguments" != xEOL; then
20614      new_complete="$new_path ${arguments% *}"
20615    else
20616      new_complete="$new_path"
20617    fi
20618
20619    if test "x$complete" != "x$new_complete"; then
20620      FOUND_MAKE="$new_complete"
20621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20622$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20623    fi
20624  fi
20625
20626        fi
20627      fi
20628    fi
20629  fi
20630
20631        fi
20632        PATH=$OLD_PATH
20633      fi
20634    fi
20635
20636    if test "x$FOUND_MAKE" = x; then
20637      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
20638    fi
20639
20640    else
20641      # If it succeeded, then it was overridden by the user. We will use it
20642      # for the tool.
20643
20644      # First remove it from the list of overridden variables, so we can test
20645      # for unknown variables in the end.
20646      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20647
20648      # Check if we try to supply an empty value
20649      if test "x$MAKE" = x; then
20650        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20651$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20653$as_echo_n "checking for MAKE... " >&6; }
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20655$as_echo "disabled" >&6; }
20656      else
20657        # Check if the provided tool contains a complete path.
20658        tool_specified="$MAKE"
20659        tool_basename="${tool_specified##*/}"
20660        if test "x$tool_basename" = "x$tool_specified"; then
20661          # A command without a complete path is provided, search $PATH.
20662          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20663$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20664          # Extract the first word of "$tool_basename", so it can be a program name with args.
20665set dummy $tool_basename; ac_word=$2
20666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20667$as_echo_n "checking for $ac_word... " >&6; }
20668if ${ac_cv_path_MAKE+:} false; then :
20669  $as_echo_n "(cached) " >&6
20670else
20671  case $MAKE in
20672  [\\/]* | ?:[\\/]*)
20673  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20674  ;;
20675  *)
20676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20677for as_dir in $PATH
20678do
20679  IFS=$as_save_IFS
20680  test -z "$as_dir" && as_dir=.
20681    for ac_exec_ext in '' $ac_executable_extensions; do
20682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20683    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20685    break 2
20686  fi
20687done
20688  done
20689IFS=$as_save_IFS
20690
20691  ;;
20692esac
20693fi
20694MAKE=$ac_cv_path_MAKE
20695if test -n "$MAKE"; then
20696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20697$as_echo "$MAKE" >&6; }
20698else
20699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20700$as_echo "no" >&6; }
20701fi
20702
20703
20704          if test "x$MAKE" = x; then
20705            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20706          fi
20707        else
20708          # Otherwise we believe it is a complete path. Use it as it is.
20709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20710$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20712$as_echo_n "checking for MAKE... " >&6; }
20713          if test ! -x "$tool_specified"; then
20714            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20715$as_echo "not found" >&6; }
20716            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20717          fi
20718          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20719$as_echo "$tool_specified" >&6; }
20720        fi
20721      fi
20722    fi
20723
20724    # If MAKE was set by user, verify the version
20725
20726  MAKE_CANDIDATE=""$MAKE""
20727  DESCRIPTION="user supplied MAKE=$MAKE"
20728
20729  # On Cygwin, we require a newer version of make than on other platforms
20730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20731    MAKE_VERSION_EXPR="-e 4\."
20732    MAKE_REQUIRED_VERSION="4.0"
20733   else
20734    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20735    MAKE_REQUIRED_VERSION="3.81"
20736  fi
20737
20738  if test "x$MAKE_CANDIDATE" != x; then
20739    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20740$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20741    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20742    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20743    if test "x$IS_GNU_MAKE" = x; then
20744      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20745$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20746    else
20747      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20748      if test "x$IS_MODERN_MAKE" = x; then
20749        { $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
20750$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;}
20751      else
20752        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20753          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754            MAKE_EXPECTED_ENV='cygwin'
20755          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20756            MAKE_EXPECTED_ENV='msys'
20757          else
20758            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20759          fi
20760          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20761          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20762        else
20763          # Not relevant for non-Windows
20764          IS_MAKE_CORRECT_ENV=true
20765        fi
20766        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20767          { $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
20768$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;}
20769        else
20770          FOUND_MAKE=$MAKE_CANDIDATE
20771
20772  # Only process if variable expands to non-empty
20773
20774  if test "x$FOUND_MAKE" != x; then
20775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20776
20777  # First separate the path from the arguments. This will split at the first
20778  # space.
20779  complete="$FOUND_MAKE"
20780  path="${complete%% *}"
20781  tmp="$complete EOL"
20782  arguments="${tmp#* }"
20783
20784  # Input might be given as Windows format, start by converting to
20785  # unix format.
20786  new_path=`$CYGPATH -u "$path"`
20787
20788  # Now try to locate executable using which
20789  new_path=`$WHICH "$new_path" 2> /dev/null`
20790  # bat and cmd files are not always considered executable in cygwin causing which
20791  # to not find them
20792  if test "x$new_path" = x \
20793      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20794      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20795    new_path=`$CYGPATH -u "$path"`
20796  fi
20797  if test "x$new_path" = x; then
20798    # Oops. Which didn't find the executable.
20799    # The splitting of arguments from the executable at a space might have been incorrect,
20800    # since paths with space are more likely in Windows. Give it another try with the whole
20801    # argument.
20802    path="$complete"
20803    arguments="EOL"
20804    new_path=`$CYGPATH -u "$path"`
20805    new_path=`$WHICH "$new_path" 2> /dev/null`
20806    # bat and cmd files are not always considered executable in cygwin causing which
20807    # to not find them
20808    if test "x$new_path" = x \
20809        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20810        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20811      new_path=`$CYGPATH -u "$path"`
20812    fi
20813    if test "x$new_path" = x; then
20814      # It's still not found. Now this is an unrecoverable error.
20815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20816$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20817      has_space=`$ECHO "$complete" | $GREP " "`
20818      if test "x$has_space" != x; then
20819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20821      fi
20822      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20823    fi
20824  fi
20825
20826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20829  # "foo.exe" is OK but "foo" is an error.
20830  #
20831  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20832  # It is also a way to make sure we got the proper file name for the real test later on.
20833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20834  if test "x$test_shortpath" = x; then
20835    # Short path failed, file does not exist as specified.
20836    # Try adding .exe or .cmd
20837    if test -f "${new_path}.exe"; then
20838      input_to_shortpath="${new_path}.exe"
20839    elif test -f "${new_path}.cmd"; then
20840      input_to_shortpath="${new_path}.cmd"
20841    else
20842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20846      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20847    fi
20848  else
20849    input_to_shortpath="$new_path"
20850  fi
20851
20852  # Call helper function which possibly converts this using DOS-style short mode.
20853  # If so, the updated path is stored in $new_path.
20854  new_path="$input_to_shortpath"
20855
20856  input_path="$input_to_shortpath"
20857  # Check if we need to convert this using DOS-style short mode. If the path
20858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20859  # take no chances and rewrite it.
20860  # Note: m4 eats our [], so we need to use [ and ] instead.
20861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20862  if test "x$has_forbidden_chars" != x; then
20863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20867      # Going to short mode and back again did indeed matter. Since short mode is
20868      # case insensitive, let's make it lowercase to improve readability.
20869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870      # Now convert it back to Unix-style (cygpath)
20871      input_path=`$CYGPATH -u "$shortmode_path"`
20872      new_path="$input_path"
20873    fi
20874  fi
20875
20876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20877  if test "x$test_cygdrive_prefix" = x; then
20878    # As a simple fix, exclude /usr/bin since it's not a real path.
20879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20881      # a path prefixed by /cygdrive for fixpath to work.
20882      new_path="$CYGWIN_ROOT_PATH$input_path"
20883    fi
20884  fi
20885
20886  # remove trailing .exe if any
20887  new_path="${new_path/%.exe/}"
20888
20889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20890
20891  # First separate the path from the arguments. This will split at the first
20892  # space.
20893  complete="$FOUND_MAKE"
20894  path="${complete%% *}"
20895  tmp="$complete EOL"
20896  arguments="${tmp#* }"
20897
20898  # Input might be given as Windows format, start by converting to
20899  # unix format.
20900  new_path="$path"
20901
20902  windows_path="$new_path"
20903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20904    unix_path=`$CYGPATH -u "$windows_path"`
20905    new_path="$unix_path"
20906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20908    new_path="$unix_path"
20909  fi
20910
20911
20912  # Now try to locate executable using which
20913  new_path=`$WHICH "$new_path" 2> /dev/null`
20914
20915  if test "x$new_path" = x; then
20916    # Oops. Which didn't find the executable.
20917    # The splitting of arguments from the executable at a space might have been incorrect,
20918    # since paths with space are more likely in Windows. Give it another try with the whole
20919    # argument.
20920    path="$complete"
20921    arguments="EOL"
20922    new_path="$path"
20923
20924  windows_path="$new_path"
20925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20926    unix_path=`$CYGPATH -u "$windows_path"`
20927    new_path="$unix_path"
20928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20930    new_path="$unix_path"
20931  fi
20932
20933
20934    new_path=`$WHICH "$new_path" 2> /dev/null`
20935    # bat and cmd files are not always considered executable in MSYS causing which
20936    # to not find them
20937    if test "x$new_path" = x \
20938        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20939        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20940      new_path="$path"
20941
20942  windows_path="$new_path"
20943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20944    unix_path=`$CYGPATH -u "$windows_path"`
20945    new_path="$unix_path"
20946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20948    new_path="$unix_path"
20949  fi
20950
20951    fi
20952
20953    if test "x$new_path" = x; then
20954      # It's still not found. Now this is an unrecoverable error.
20955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20957      has_space=`$ECHO "$complete" | $GREP " "`
20958      if test "x$has_space" != x; then
20959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20961      fi
20962      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20963    fi
20964  fi
20965
20966  # Now new_path has a complete unix path to the binary
20967  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20968    # Keep paths in /bin as-is, but remove trailing .exe if any
20969    new_path="${new_path/%.exe/}"
20970    # Do not save /bin paths to all_fixpath_prefixes!
20971  else
20972    # Not in mixed or Windows style, start by that.
20973    new_path=`cmd //c echo $new_path`
20974
20975  input_path="$new_path"
20976  # Check if we need to convert this using DOS-style short mode. If the path
20977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20978  # take no chances and rewrite it.
20979  # Note: m4 eats our [], so we need to use [ and ] instead.
20980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20981  if test "x$has_forbidden_chars" != x; then
20982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20984  fi
20985
20986    # Output is in $new_path
20987
20988  windows_path="$new_path"
20989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20990    unix_path=`$CYGPATH -u "$windows_path"`
20991    new_path="$unix_path"
20992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20994    new_path="$unix_path"
20995  fi
20996
20997    # remove trailing .exe if any
20998    new_path="${new_path/%.exe/}"
20999
21000    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21001    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21002  fi
21003
21004    else
21005      # We're on a unix platform. Hooray! :)
21006      # First separate the path from the arguments. This will split at the first
21007      # space.
21008      complete="$FOUND_MAKE"
21009      path="${complete%% *}"
21010      tmp="$complete EOL"
21011      arguments="${tmp#* }"
21012
21013      # Cannot rely on the command "which" here since it doesn't always work.
21014      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21015      if test -z "$is_absolute_path"; then
21016        # Path to executable is not absolute. Find it.
21017        IFS_save="$IFS"
21018        IFS=:
21019        for p in $PATH; do
21020          if test -f "$p/$path" && test -x "$p/$path"; then
21021            new_path="$p/$path"
21022            break
21023          fi
21024        done
21025        IFS="$IFS_save"
21026      else
21027        # This is an absolute path, we can use it without further modifications.
21028        new_path="$path"
21029      fi
21030
21031      if test "x$new_path" = x; then
21032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21034        has_space=`$ECHO "$complete" | $GREP " "`
21035        if test "x$has_space" != x; then
21036          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21037$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21038        fi
21039        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21040      fi
21041    fi
21042
21043    # Now join together the path and the arguments once again
21044    if test "x$arguments" != xEOL; then
21045      new_complete="$new_path ${arguments% *}"
21046    else
21047      new_complete="$new_path"
21048    fi
21049
21050    if test "x$complete" != "x$new_complete"; then
21051      FOUND_MAKE="$new_complete"
21052      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21053$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21054    fi
21055  fi
21056
21057        fi
21058      fi
21059    fi
21060  fi
21061
21062    if test "x$FOUND_MAKE" = x; then
21063      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21064    fi
21065
21066  fi
21067
21068
21069  MAKE=$FOUND_MAKE
21070
21071  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21072$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21073
21074
21075  # Check if make supports the output sync option and if so, setup using it.
21076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21077$as_echo_n "checking if make --output-sync is supported... " >&6; }
21078  if $MAKE --version -O > /dev/null 2>&1; then
21079    OUTPUT_SYNC_SUPPORTED=true
21080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21081$as_echo "yes" >&6; }
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21083$as_echo_n "checking for output-sync value... " >&6; }
21084
21085# Check whether --with-output-sync was given.
21086if test "${with_output_sync+set}" = set; then :
21087  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21088fi
21089
21090    if test "x$OUTPUT_SYNC" = "x"; then
21091      OUTPUT_SYNC=none
21092    fi
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21094$as_echo "$OUTPUT_SYNC" >&6; }
21095    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21096      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21097    fi
21098  else
21099    OUTPUT_SYNC_SUPPORTED=false
21100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21101$as_echo "no" >&6; }
21102  fi
21103
21104
21105
21106
21107
21108
21109  # Test if find supports -delete
21110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21111$as_echo_n "checking if find supports -delete... " >&6; }
21112  FIND_DELETE="-delete"
21113
21114  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21115
21116  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21117
21118  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21119  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21120    # No, it does not.
21121    $RM $DELETEDIR/TestIfFindSupportsDelete
21122    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21123      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21124      FIND_DELETE="-print | $XARGS $RM"
21125    else
21126      FIND_DELETE="-exec $RM \{\} \+"
21127    fi
21128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21129$as_echo "no" >&6; }
21130  else
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21132$as_echo "yes" >&6; }
21133  fi
21134  $RMDIR $DELETEDIR
21135
21136
21137
21138  # Test which kind of tar was found
21139  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21140    TAR_TYPE="gnu"
21141  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21142    TAR_TYPE="bsd"
21143  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21144    TAR_TYPE="solaris"
21145  fi
21146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21147$as_echo_n "checking what type of tar was found... " >&6; }
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21149$as_echo "$TAR_TYPE" >&6; }
21150
21151  TAR_CREATE_FILE_PARAM=""
21152
21153  if test "x$TAR_TYPE" = "xgnu"; then
21154    TAR_INCLUDE_PARAM="T"
21155    TAR_SUPPORTS_TRANSFORM="true"
21156    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21157      # When using gnu tar for Solaris targets, need to use compatibility mode
21158      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21159    fi
21160  else
21161    TAR_INCLUDE_PARAM="I"
21162    TAR_SUPPORTS_TRANSFORM="false"
21163  fi
21164
21165
21166
21167
21168
21169
21170  # These tools might not be installed by default,
21171  # need hint on how to install them.
21172
21173
21174
21175  # Publish this variable in the help.
21176
21177
21178  if [ -z "${UNZIP+x}" ]; then
21179    # The variable is not set by user, try to locate tool using the code snippet
21180    for ac_prog in unzip
21181do
21182  # Extract the first word of "$ac_prog", so it can be a program name with args.
21183set dummy $ac_prog; ac_word=$2
21184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185$as_echo_n "checking for $ac_word... " >&6; }
21186if ${ac_cv_path_UNZIP+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  case $UNZIP in
21190  [\\/]* | ?:[\\/]*)
21191  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21192  ;;
21193  *)
21194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195for as_dir in $PATH
21196do
21197  IFS=$as_save_IFS
21198  test -z "$as_dir" && as_dir=.
21199    for ac_exec_ext in '' $ac_executable_extensions; do
21200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203    break 2
21204  fi
21205done
21206  done
21207IFS=$as_save_IFS
21208
21209  ;;
21210esac
21211fi
21212UNZIP=$ac_cv_path_UNZIP
21213if test -n "$UNZIP"; then
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21215$as_echo "$UNZIP" >&6; }
21216else
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218$as_echo "no" >&6; }
21219fi
21220
21221
21222  test -n "$UNZIP" && break
21223done
21224
21225  else
21226    # The variable is set, but is it from the command line or the environment?
21227
21228    # Try to remove the string !UNZIP! from our list.
21229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21231      # If it failed, the variable was not from the command line. Ignore it,
21232      # but warn the user (except for BASH, which is always set by the calling BASH).
21233      if test "xUNZIP" != xBASH; then
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21235$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21236      fi
21237      # Try to locate tool using the code snippet
21238      for ac_prog in unzip
21239do
21240  # Extract the first word of "$ac_prog", so it can be a program name with args.
21241set dummy $ac_prog; ac_word=$2
21242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21243$as_echo_n "checking for $ac_word... " >&6; }
21244if ${ac_cv_path_UNZIP+:} false; then :
21245  $as_echo_n "(cached) " >&6
21246else
21247  case $UNZIP in
21248  [\\/]* | ?:[\\/]*)
21249  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21250  ;;
21251  *)
21252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21253for as_dir in $PATH
21254do
21255  IFS=$as_save_IFS
21256  test -z "$as_dir" && as_dir=.
21257    for ac_exec_ext in '' $ac_executable_extensions; do
21258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21259    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21261    break 2
21262  fi
21263done
21264  done
21265IFS=$as_save_IFS
21266
21267  ;;
21268esac
21269fi
21270UNZIP=$ac_cv_path_UNZIP
21271if test -n "$UNZIP"; then
21272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21273$as_echo "$UNZIP" >&6; }
21274else
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21276$as_echo "no" >&6; }
21277fi
21278
21279
21280  test -n "$UNZIP" && break
21281done
21282
21283    else
21284      # If it succeeded, then it was overridden by the user. We will use it
21285      # for the tool.
21286
21287      # First remove it from the list of overridden variables, so we can test
21288      # for unknown variables in the end.
21289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21290
21291      # Check if we try to supply an empty value
21292      if test "x$UNZIP" = x; then
21293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21294$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21296$as_echo_n "checking for UNZIP... " >&6; }
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21298$as_echo "disabled" >&6; }
21299      else
21300        # Check if the provided tool contains a complete path.
21301        tool_specified="$UNZIP"
21302        tool_basename="${tool_specified##*/}"
21303        if test "x$tool_basename" = "x$tool_specified"; then
21304          # A command without a complete path is provided, search $PATH.
21305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21306$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21307          # Extract the first word of "$tool_basename", so it can be a program name with args.
21308set dummy $tool_basename; ac_word=$2
21309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21310$as_echo_n "checking for $ac_word... " >&6; }
21311if ${ac_cv_path_UNZIP+:} false; then :
21312  $as_echo_n "(cached) " >&6
21313else
21314  case $UNZIP in
21315  [\\/]* | ?:[\\/]*)
21316  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21317  ;;
21318  *)
21319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21320for as_dir in $PATH
21321do
21322  IFS=$as_save_IFS
21323  test -z "$as_dir" && as_dir=.
21324    for ac_exec_ext in '' $ac_executable_extensions; do
21325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21326    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21328    break 2
21329  fi
21330done
21331  done
21332IFS=$as_save_IFS
21333
21334  ;;
21335esac
21336fi
21337UNZIP=$ac_cv_path_UNZIP
21338if test -n "$UNZIP"; then
21339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21340$as_echo "$UNZIP" >&6; }
21341else
21342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21343$as_echo "no" >&6; }
21344fi
21345
21346
21347          if test "x$UNZIP" = x; then
21348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21349          fi
21350        else
21351          # Otherwise we believe it is a complete path. Use it as it is.
21352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21353$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21355$as_echo_n "checking for UNZIP... " >&6; }
21356          if test ! -x "$tool_specified"; then
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21358$as_echo "not found" >&6; }
21359            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21360          fi
21361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21362$as_echo "$tool_specified" >&6; }
21363        fi
21364      fi
21365    fi
21366
21367  fi
21368
21369
21370
21371  if test "x$UNZIP" = x; then
21372    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21373  fi
21374
21375
21376  # Since zip uses "ZIP" as a environment variable for passing options, we need
21377  # to name our variable differently, hence ZIPEXE.
21378
21379
21380
21381  # Publish this variable in the help.
21382
21383
21384  if [ -z "${ZIPEXE+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_ZIPEXE+:} false; then :
21393  $as_echo_n "(cached) " >&6
21394else
21395  case $ZIPEXE in
21396  [\\/]* | ?:[\\/]*)
21397  ac_cv_path_ZIPEXE="$ZIPEXE" # 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_ZIPEXE="$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
21418ZIPEXE=$ac_cv_path_ZIPEXE
21419if test -n "$ZIPEXE"; then
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21421$as_echo "$ZIPEXE" >&6; }
21422else
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424$as_echo "no" >&6; }
21425fi
21426
21427
21428  test -n "$ZIPEXE" && 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 !ZIPEXE! from our list.
21435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
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 "xZIPEXE" != xBASH; then
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21441$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE 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_ZIPEXE+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $ZIPEXE in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_ZIPEXE="$ZIPEXE" # 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_ZIPEXE="$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
21476ZIPEXE=$ac_cv_path_ZIPEXE
21477if test -n "$ZIPEXE"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21479$as_echo "$ZIPEXE" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486  test -n "$ZIPEXE" && 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$ZIPEXE" = x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21500$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21502$as_echo_n "checking for ZIPEXE... " >&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="$ZIPEXE"
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 ZIPEXE=$tool_basename" >&5
21512$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$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_ZIPEXE+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $ZIPEXE in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_ZIPEXE="$ZIPEXE" # 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_ZIPEXE="$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
21543ZIPEXE=$ac_cv_path_ZIPEXE
21544if test -n "$ZIPEXE"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21546$as_echo "$ZIPEXE" >&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$ZIPEXE" = 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 ZIPEXE=$tool_specified" >&5
21559$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21561$as_echo_n "checking for ZIPEXE... " >&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 ZIPEXE=$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$ZIPEXE" = x; then
21578    as_fn_error $? "Could not find required tool for ZIPEXE" "$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  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
22777  # be in the user path.
22778
22779
22780  # Publish this variable in the help.
22781
22782
22783  if [ -z "${DTRACE+x}" ]; then
22784    # The variable is not set by user, try to locate tool using the code snippet
22785    for ac_prog in dtrace
22786do
22787  # Extract the first word of "$ac_prog", so it can be a program name with args.
22788set dummy $ac_prog; ac_word=$2
22789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22790$as_echo_n "checking for $ac_word... " >&6; }
22791if ${ac_cv_path_DTRACE+:} false; then :
22792  $as_echo_n "(cached) " >&6
22793else
22794  case $DTRACE in
22795  [\\/]* | ?:[\\/]*)
22796  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22797  ;;
22798  *)
22799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22800as_dummy="$PATH:/usr/sbin"
22801for as_dir in $as_dummy
22802do
22803  IFS=$as_save_IFS
22804  test -z "$as_dir" && as_dir=.
22805    for ac_exec_ext in '' $ac_executable_extensions; do
22806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22807    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22809    break 2
22810  fi
22811done
22812  done
22813IFS=$as_save_IFS
22814
22815  ;;
22816esac
22817fi
22818DTRACE=$ac_cv_path_DTRACE
22819if test -n "$DTRACE"; then
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22821$as_echo "$DTRACE" >&6; }
22822else
22823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22824$as_echo "no" >&6; }
22825fi
22826
22827
22828  test -n "$DTRACE" && break
22829done
22830
22831  else
22832    # The variable is set, but is it from the command line or the environment?
22833
22834    # Try to remove the string !DTRACE! from our list.
22835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22837      # If it failed, the variable was not from the command line. Ignore it,
22838      # but warn the user (except for BASH, which is always set by the calling BASH).
22839      if test "xDTRACE" != xBASH; then
22840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22841$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22842      fi
22843      # Try to locate tool using the code snippet
22844      for ac_prog in dtrace
22845do
22846  # Extract the first word of "$ac_prog", so it can be a program name with args.
22847set dummy $ac_prog; ac_word=$2
22848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22849$as_echo_n "checking for $ac_word... " >&6; }
22850if ${ac_cv_path_DTRACE+:} false; then :
22851  $as_echo_n "(cached) " >&6
22852else
22853  case $DTRACE in
22854  [\\/]* | ?:[\\/]*)
22855  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22856  ;;
22857  *)
22858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22859as_dummy="$PATH:/usr/sbin"
22860for as_dir in $as_dummy
22861do
22862  IFS=$as_save_IFS
22863  test -z "$as_dir" && as_dir=.
22864    for ac_exec_ext in '' $ac_executable_extensions; do
22865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22866    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22868    break 2
22869  fi
22870done
22871  done
22872IFS=$as_save_IFS
22873
22874  ;;
22875esac
22876fi
22877DTRACE=$ac_cv_path_DTRACE
22878if test -n "$DTRACE"; then
22879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22880$as_echo "$DTRACE" >&6; }
22881else
22882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22883$as_echo "no" >&6; }
22884fi
22885
22886
22887  test -n "$DTRACE" && break
22888done
22889
22890    else
22891      # If it succeeded, then it was overridden by the user. We will use it
22892      # for the tool.
22893
22894      # First remove it from the list of overridden variables, so we can test
22895      # for unknown variables in the end.
22896      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22897
22898      # Check if we try to supply an empty value
22899      if test "x$DTRACE" = x; then
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22901$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22903$as_echo_n "checking for DTRACE... " >&6; }
22904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22905$as_echo "disabled" >&6; }
22906      else
22907        # Check if the provided tool contains a complete path.
22908        tool_specified="$DTRACE"
22909        tool_basename="${tool_specified##*/}"
22910        if test "x$tool_basename" = "x$tool_specified"; then
22911          # A command without a complete path is provided, search $PATH.
22912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22913$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22914          # Extract the first word of "$tool_basename", so it can be a program name with args.
22915set dummy $tool_basename; ac_word=$2
22916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22917$as_echo_n "checking for $ac_word... " >&6; }
22918if ${ac_cv_path_DTRACE+:} false; then :
22919  $as_echo_n "(cached) " >&6
22920else
22921  case $DTRACE in
22922  [\\/]* | ?:[\\/]*)
22923  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22924  ;;
22925  *)
22926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22927for as_dir in $PATH
22928do
22929  IFS=$as_save_IFS
22930  test -z "$as_dir" && as_dir=.
22931    for ac_exec_ext in '' $ac_executable_extensions; do
22932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22933    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22935    break 2
22936  fi
22937done
22938  done
22939IFS=$as_save_IFS
22940
22941  ;;
22942esac
22943fi
22944DTRACE=$ac_cv_path_DTRACE
22945if test -n "$DTRACE"; then
22946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22947$as_echo "$DTRACE" >&6; }
22948else
22949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22950$as_echo "no" >&6; }
22951fi
22952
22953
22954          if test "x$DTRACE" = x; then
22955            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22956          fi
22957        else
22958          # Otherwise we believe it is a complete path. Use it as it is.
22959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22960$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22961          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22962$as_echo_n "checking for DTRACE... " >&6; }
22963          if test ! -x "$tool_specified"; then
22964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22965$as_echo "not found" >&6; }
22966            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22967          fi
22968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22969$as_echo "$tool_specified" >&6; }
22970        fi
22971      fi
22972    fi
22973
22974  fi
22975
22976
22977
22978
22979  # Publish this variable in the help.
22980
22981
22982  if [ -z "${PATCH+x}" ]; then
22983    # The variable is not set by user, try to locate tool using the code snippet
22984    for ac_prog in gpatch patch
22985do
22986  # Extract the first word of "$ac_prog", so it can be a program name with args.
22987set dummy $ac_prog; ac_word=$2
22988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22989$as_echo_n "checking for $ac_word... " >&6; }
22990if ${ac_cv_path_PATCH+:} false; then :
22991  $as_echo_n "(cached) " >&6
22992else
22993  case $PATCH in
22994  [\\/]* | ?:[\\/]*)
22995  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22996  ;;
22997  *)
22998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22999for as_dir in $PATH
23000do
23001  IFS=$as_save_IFS
23002  test -z "$as_dir" && as_dir=.
23003    for ac_exec_ext in '' $ac_executable_extensions; do
23004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23005    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23007    break 2
23008  fi
23009done
23010  done
23011IFS=$as_save_IFS
23012
23013  ;;
23014esac
23015fi
23016PATCH=$ac_cv_path_PATCH
23017if test -n "$PATCH"; then
23018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23019$as_echo "$PATCH" >&6; }
23020else
23021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23022$as_echo "no" >&6; }
23023fi
23024
23025
23026  test -n "$PATCH" && break
23027done
23028
23029  else
23030    # The variable is set, but is it from the command line or the environment?
23031
23032    # Try to remove the string !PATCH! from our list.
23033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23035      # If it failed, the variable was not from the command line. Ignore it,
23036      # but warn the user (except for BASH, which is always set by the calling BASH).
23037      if test "xPATCH" != xBASH; then
23038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23039$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23040      fi
23041      # Try to locate tool using the code snippet
23042      for ac_prog in gpatch patch
23043do
23044  # Extract the first word of "$ac_prog", so it can be a program name with args.
23045set dummy $ac_prog; ac_word=$2
23046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23047$as_echo_n "checking for $ac_word... " >&6; }
23048if ${ac_cv_path_PATCH+:} false; then :
23049  $as_echo_n "(cached) " >&6
23050else
23051  case $PATCH in
23052  [\\/]* | ?:[\\/]*)
23053  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23054  ;;
23055  *)
23056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23057for as_dir in $PATH
23058do
23059  IFS=$as_save_IFS
23060  test -z "$as_dir" && as_dir=.
23061    for ac_exec_ext in '' $ac_executable_extensions; do
23062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23063    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23065    break 2
23066  fi
23067done
23068  done
23069IFS=$as_save_IFS
23070
23071  ;;
23072esac
23073fi
23074PATCH=$ac_cv_path_PATCH
23075if test -n "$PATCH"; then
23076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23077$as_echo "$PATCH" >&6; }
23078else
23079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23080$as_echo "no" >&6; }
23081fi
23082
23083
23084  test -n "$PATCH" && break
23085done
23086
23087    else
23088      # If it succeeded, then it was overridden by the user. We will use it
23089      # for the tool.
23090
23091      # First remove it from the list of overridden variables, so we can test
23092      # for unknown variables in the end.
23093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23094
23095      # Check if we try to supply an empty value
23096      if test "x$PATCH" = x; then
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23098$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23100$as_echo_n "checking for PATCH... " >&6; }
23101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23102$as_echo "disabled" >&6; }
23103      else
23104        # Check if the provided tool contains a complete path.
23105        tool_specified="$PATCH"
23106        tool_basename="${tool_specified##*/}"
23107        if test "x$tool_basename" = "x$tool_specified"; then
23108          # A command without a complete path is provided, search $PATH.
23109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23110$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23111          # Extract the first word of "$tool_basename", so it can be a program name with args.
23112set dummy $tool_basename; ac_word=$2
23113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23114$as_echo_n "checking for $ac_word... " >&6; }
23115if ${ac_cv_path_PATCH+:} false; then :
23116  $as_echo_n "(cached) " >&6
23117else
23118  case $PATCH in
23119  [\\/]* | ?:[\\/]*)
23120  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23121  ;;
23122  *)
23123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23124for as_dir in $PATH
23125do
23126  IFS=$as_save_IFS
23127  test -z "$as_dir" && as_dir=.
23128    for ac_exec_ext in '' $ac_executable_extensions; do
23129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23130    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23132    break 2
23133  fi
23134done
23135  done
23136IFS=$as_save_IFS
23137
23138  ;;
23139esac
23140fi
23141PATCH=$ac_cv_path_PATCH
23142if test -n "$PATCH"; then
23143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23144$as_echo "$PATCH" >&6; }
23145else
23146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23147$as_echo "no" >&6; }
23148fi
23149
23150
23151          if test "x$PATCH" = x; then
23152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23153          fi
23154        else
23155          # Otherwise we believe it is a complete path. Use it as it is.
23156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23157$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23159$as_echo_n "checking for PATCH... " >&6; }
23160          if test ! -x "$tool_specified"; then
23161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23162$as_echo "not found" >&6; }
23163            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23164          fi
23165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23166$as_echo "$tool_specified" >&6; }
23167        fi
23168      fi
23169    fi
23170
23171  fi
23172
23173
23174  # Check if it's GNU time
23175  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23176  if test "x$IS_GNU_TIME" != x; then
23177    IS_GNU_TIME=yes
23178  else
23179    IS_GNU_TIME=no
23180  fi
23181
23182
23183  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23184
23185
23186
23187  # Publish this variable in the help.
23188
23189
23190  if [ -z "${DSYMUTIL+x}" ]; then
23191    # The variable is not set by user, try to locate tool using the code snippet
23192    for ac_prog in dsymutil
23193do
23194  # Extract the first word of "$ac_prog", so it can be a program name with args.
23195set dummy $ac_prog; ac_word=$2
23196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23197$as_echo_n "checking for $ac_word... " >&6; }
23198if ${ac_cv_path_DSYMUTIL+:} false; then :
23199  $as_echo_n "(cached) " >&6
23200else
23201  case $DSYMUTIL in
23202  [\\/]* | ?:[\\/]*)
23203  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23204  ;;
23205  *)
23206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23207for as_dir in $PATH
23208do
23209  IFS=$as_save_IFS
23210  test -z "$as_dir" && as_dir=.
23211    for ac_exec_ext in '' $ac_executable_extensions; do
23212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23213    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23215    break 2
23216  fi
23217done
23218  done
23219IFS=$as_save_IFS
23220
23221  ;;
23222esac
23223fi
23224DSYMUTIL=$ac_cv_path_DSYMUTIL
23225if test -n "$DSYMUTIL"; then
23226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23227$as_echo "$DSYMUTIL" >&6; }
23228else
23229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23230$as_echo "no" >&6; }
23231fi
23232
23233
23234  test -n "$DSYMUTIL" && break
23235done
23236
23237  else
23238    # The variable is set, but is it from the command line or the environment?
23239
23240    # Try to remove the string !DSYMUTIL! from our list.
23241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23243      # If it failed, the variable was not from the command line. Ignore it,
23244      # but warn the user (except for BASH, which is always set by the calling BASH).
23245      if test "xDSYMUTIL" != xBASH; then
23246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23247$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23248      fi
23249      # Try to locate tool using the code snippet
23250      for ac_prog in dsymutil
23251do
23252  # Extract the first word of "$ac_prog", so it can be a program name with args.
23253set dummy $ac_prog; ac_word=$2
23254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23255$as_echo_n "checking for $ac_word... " >&6; }
23256if ${ac_cv_path_DSYMUTIL+:} false; then :
23257  $as_echo_n "(cached) " >&6
23258else
23259  case $DSYMUTIL in
23260  [\\/]* | ?:[\\/]*)
23261  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23262  ;;
23263  *)
23264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23265for as_dir in $PATH
23266do
23267  IFS=$as_save_IFS
23268  test -z "$as_dir" && as_dir=.
23269    for ac_exec_ext in '' $ac_executable_extensions; do
23270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23271    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23273    break 2
23274  fi
23275done
23276  done
23277IFS=$as_save_IFS
23278
23279  ;;
23280esac
23281fi
23282DSYMUTIL=$ac_cv_path_DSYMUTIL
23283if test -n "$DSYMUTIL"; then
23284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23285$as_echo "$DSYMUTIL" >&6; }
23286else
23287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23288$as_echo "no" >&6; }
23289fi
23290
23291
23292  test -n "$DSYMUTIL" && break
23293done
23294
23295    else
23296      # If it succeeded, then it was overridden by the user. We will use it
23297      # for the tool.
23298
23299      # First remove it from the list of overridden variables, so we can test
23300      # for unknown variables in the end.
23301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23302
23303      # Check if we try to supply an empty value
23304      if test "x$DSYMUTIL" = x; then
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23306$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23308$as_echo_n "checking for DSYMUTIL... " >&6; }
23309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23310$as_echo "disabled" >&6; }
23311      else
23312        # Check if the provided tool contains a complete path.
23313        tool_specified="$DSYMUTIL"
23314        tool_basename="${tool_specified##*/}"
23315        if test "x$tool_basename" = "x$tool_specified"; then
23316          # A command without a complete path is provided, search $PATH.
23317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23318$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23319          # Extract the first word of "$tool_basename", so it can be a program name with args.
23320set dummy $tool_basename; ac_word=$2
23321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23322$as_echo_n "checking for $ac_word... " >&6; }
23323if ${ac_cv_path_DSYMUTIL+:} false; then :
23324  $as_echo_n "(cached) " >&6
23325else
23326  case $DSYMUTIL in
23327  [\\/]* | ?:[\\/]*)
23328  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23329  ;;
23330  *)
23331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23332for as_dir in $PATH
23333do
23334  IFS=$as_save_IFS
23335  test -z "$as_dir" && as_dir=.
23336    for ac_exec_ext in '' $ac_executable_extensions; do
23337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23338    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23340    break 2
23341  fi
23342done
23343  done
23344IFS=$as_save_IFS
23345
23346  ;;
23347esac
23348fi
23349DSYMUTIL=$ac_cv_path_DSYMUTIL
23350if test -n "$DSYMUTIL"; then
23351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23352$as_echo "$DSYMUTIL" >&6; }
23353else
23354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23355$as_echo "no" >&6; }
23356fi
23357
23358
23359          if test "x$DSYMUTIL" = x; then
23360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23361          fi
23362        else
23363          # Otherwise we believe it is a complete path. Use it as it is.
23364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23365$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23367$as_echo_n "checking for DSYMUTIL... " >&6; }
23368          if test ! -x "$tool_specified"; then
23369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23370$as_echo "not found" >&6; }
23371            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23372          fi
23373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23374$as_echo "$tool_specified" >&6; }
23375        fi
23376      fi
23377    fi
23378
23379  fi
23380
23381
23382
23383  if test "x$DSYMUTIL" = x; then
23384    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23385  fi
23386
23387
23388
23389
23390
23391  # Publish this variable in the help.
23392
23393
23394  if [ -z "${XATTR+x}" ]; then
23395    # The variable is not set by user, try to locate tool using the code snippet
23396    for ac_prog in xattr
23397do
23398  # Extract the first word of "$ac_prog", so it can be a program name with args.
23399set dummy $ac_prog; ac_word=$2
23400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23401$as_echo_n "checking for $ac_word... " >&6; }
23402if ${ac_cv_path_XATTR+:} false; then :
23403  $as_echo_n "(cached) " >&6
23404else
23405  case $XATTR in
23406  [\\/]* | ?:[\\/]*)
23407  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23408  ;;
23409  *)
23410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23411for as_dir in $PATH
23412do
23413  IFS=$as_save_IFS
23414  test -z "$as_dir" && as_dir=.
23415    for ac_exec_ext in '' $ac_executable_extensions; do
23416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23417    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23419    break 2
23420  fi
23421done
23422  done
23423IFS=$as_save_IFS
23424
23425  ;;
23426esac
23427fi
23428XATTR=$ac_cv_path_XATTR
23429if test -n "$XATTR"; then
23430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23431$as_echo "$XATTR" >&6; }
23432else
23433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23434$as_echo "no" >&6; }
23435fi
23436
23437
23438  test -n "$XATTR" && break
23439done
23440
23441  else
23442    # The variable is set, but is it from the command line or the environment?
23443
23444    # Try to remove the string !XATTR! from our list.
23445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23447      # If it failed, the variable was not from the command line. Ignore it,
23448      # but warn the user (except for BASH, which is always set by the calling BASH).
23449      if test "xXATTR" != xBASH; then
23450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23451$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23452      fi
23453      # Try to locate tool using the code snippet
23454      for ac_prog in xattr
23455do
23456  # Extract the first word of "$ac_prog", so it can be a program name with args.
23457set dummy $ac_prog; ac_word=$2
23458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23459$as_echo_n "checking for $ac_word... " >&6; }
23460if ${ac_cv_path_XATTR+:} false; then :
23461  $as_echo_n "(cached) " >&6
23462else
23463  case $XATTR in
23464  [\\/]* | ?:[\\/]*)
23465  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23466  ;;
23467  *)
23468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23469for as_dir in $PATH
23470do
23471  IFS=$as_save_IFS
23472  test -z "$as_dir" && as_dir=.
23473    for ac_exec_ext in '' $ac_executable_extensions; do
23474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23475    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23477    break 2
23478  fi
23479done
23480  done
23481IFS=$as_save_IFS
23482
23483  ;;
23484esac
23485fi
23486XATTR=$ac_cv_path_XATTR
23487if test -n "$XATTR"; then
23488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23489$as_echo "$XATTR" >&6; }
23490else
23491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23492$as_echo "no" >&6; }
23493fi
23494
23495
23496  test -n "$XATTR" && break
23497done
23498
23499    else
23500      # If it succeeded, then it was overridden by the user. We will use it
23501      # for the tool.
23502
23503      # First remove it from the list of overridden variables, so we can test
23504      # for unknown variables in the end.
23505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23506
23507      # Check if we try to supply an empty value
23508      if test "x$XATTR" = x; then
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23510$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23511        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23512$as_echo_n "checking for XATTR... " >&6; }
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23514$as_echo "disabled" >&6; }
23515      else
23516        # Check if the provided tool contains a complete path.
23517        tool_specified="$XATTR"
23518        tool_basename="${tool_specified##*/}"
23519        if test "x$tool_basename" = "x$tool_specified"; then
23520          # A command without a complete path is provided, search $PATH.
23521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23522$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23523          # Extract the first word of "$tool_basename", so it can be a program name with args.
23524set dummy $tool_basename; ac_word=$2
23525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23526$as_echo_n "checking for $ac_word... " >&6; }
23527if ${ac_cv_path_XATTR+:} false; then :
23528  $as_echo_n "(cached) " >&6
23529else
23530  case $XATTR in
23531  [\\/]* | ?:[\\/]*)
23532  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23533  ;;
23534  *)
23535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23536for as_dir in $PATH
23537do
23538  IFS=$as_save_IFS
23539  test -z "$as_dir" && as_dir=.
23540    for ac_exec_ext in '' $ac_executable_extensions; do
23541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23542    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23544    break 2
23545  fi
23546done
23547  done
23548IFS=$as_save_IFS
23549
23550  ;;
23551esac
23552fi
23553XATTR=$ac_cv_path_XATTR
23554if test -n "$XATTR"; then
23555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23556$as_echo "$XATTR" >&6; }
23557else
23558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23559$as_echo "no" >&6; }
23560fi
23561
23562
23563          if test "x$XATTR" = x; then
23564            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23565          fi
23566        else
23567          # Otherwise we believe it is a complete path. Use it as it is.
23568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23569$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23570          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23571$as_echo_n "checking for XATTR... " >&6; }
23572          if test ! -x "$tool_specified"; then
23573            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23574$as_echo "not found" >&6; }
23575            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23576          fi
23577          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23578$as_echo "$tool_specified" >&6; }
23579        fi
23580      fi
23581    fi
23582
23583  fi
23584
23585
23586
23587  if test "x$XATTR" = x; then
23588    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23589  fi
23590
23591
23592
23593
23594  # Publish this variable in the help.
23595
23596
23597  if [ -z "${CODESIGN+x}" ]; then
23598    # The variable is not set by user, try to locate tool using the code snippet
23599    for ac_prog in codesign
23600do
23601  # Extract the first word of "$ac_prog", so it can be a program name with args.
23602set dummy $ac_prog; ac_word=$2
23603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23604$as_echo_n "checking for $ac_word... " >&6; }
23605if ${ac_cv_path_CODESIGN+:} false; then :
23606  $as_echo_n "(cached) " >&6
23607else
23608  case $CODESIGN in
23609  [\\/]* | ?:[\\/]*)
23610  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23611  ;;
23612  *)
23613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23614for as_dir in $PATH
23615do
23616  IFS=$as_save_IFS
23617  test -z "$as_dir" && as_dir=.
23618    for ac_exec_ext in '' $ac_executable_extensions; do
23619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23620    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23622    break 2
23623  fi
23624done
23625  done
23626IFS=$as_save_IFS
23627
23628  ;;
23629esac
23630fi
23631CODESIGN=$ac_cv_path_CODESIGN
23632if test -n "$CODESIGN"; then
23633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23634$as_echo "$CODESIGN" >&6; }
23635else
23636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23637$as_echo "no" >&6; }
23638fi
23639
23640
23641  test -n "$CODESIGN" && break
23642done
23643
23644  else
23645    # The variable is set, but is it from the command line or the environment?
23646
23647    # Try to remove the string !CODESIGN! from our list.
23648    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23649    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23650      # If it failed, the variable was not from the command line. Ignore it,
23651      # but warn the user (except for BASH, which is always set by the calling BASH).
23652      if test "xCODESIGN" != xBASH; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23654$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23655      fi
23656      # Try to locate tool using the code snippet
23657      for ac_prog in codesign
23658do
23659  # Extract the first word of "$ac_prog", so it can be a program name with args.
23660set dummy $ac_prog; ac_word=$2
23661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23662$as_echo_n "checking for $ac_word... " >&6; }
23663if ${ac_cv_path_CODESIGN+:} false; then :
23664  $as_echo_n "(cached) " >&6
23665else
23666  case $CODESIGN in
23667  [\\/]* | ?:[\\/]*)
23668  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23669  ;;
23670  *)
23671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23672for as_dir in $PATH
23673do
23674  IFS=$as_save_IFS
23675  test -z "$as_dir" && as_dir=.
23676    for ac_exec_ext in '' $ac_executable_extensions; do
23677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23678    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23680    break 2
23681  fi
23682done
23683  done
23684IFS=$as_save_IFS
23685
23686  ;;
23687esac
23688fi
23689CODESIGN=$ac_cv_path_CODESIGN
23690if test -n "$CODESIGN"; then
23691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23692$as_echo "$CODESIGN" >&6; }
23693else
23694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23695$as_echo "no" >&6; }
23696fi
23697
23698
23699  test -n "$CODESIGN" && break
23700done
23701
23702    else
23703      # If it succeeded, then it was overridden by the user. We will use it
23704      # for the tool.
23705
23706      # First remove it from the list of overridden variables, so we can test
23707      # for unknown variables in the end.
23708      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23709
23710      # Check if we try to supply an empty value
23711      if test "x$CODESIGN" = x; then
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23713$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23714        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23715$as_echo_n "checking for CODESIGN... " >&6; }
23716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23717$as_echo "disabled" >&6; }
23718      else
23719        # Check if the provided tool contains a complete path.
23720        tool_specified="$CODESIGN"
23721        tool_basename="${tool_specified##*/}"
23722        if test "x$tool_basename" = "x$tool_specified"; then
23723          # A command without a complete path is provided, search $PATH.
23724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23725$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23726          # Extract the first word of "$tool_basename", so it can be a program name with args.
23727set dummy $tool_basename; ac_word=$2
23728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23729$as_echo_n "checking for $ac_word... " >&6; }
23730if ${ac_cv_path_CODESIGN+:} false; then :
23731  $as_echo_n "(cached) " >&6
23732else
23733  case $CODESIGN in
23734  [\\/]* | ?:[\\/]*)
23735  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23736  ;;
23737  *)
23738  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23739for as_dir in $PATH
23740do
23741  IFS=$as_save_IFS
23742  test -z "$as_dir" && as_dir=.
23743    for ac_exec_ext in '' $ac_executable_extensions; do
23744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23745    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23747    break 2
23748  fi
23749done
23750  done
23751IFS=$as_save_IFS
23752
23753  ;;
23754esac
23755fi
23756CODESIGN=$ac_cv_path_CODESIGN
23757if test -n "$CODESIGN"; then
23758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23759$as_echo "$CODESIGN" >&6; }
23760else
23761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23762$as_echo "no" >&6; }
23763fi
23764
23765
23766          if test "x$CODESIGN" = x; then
23767            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23768          fi
23769        else
23770          # Otherwise we believe it is a complete path. Use it as it is.
23771          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23772$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23773          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23774$as_echo_n "checking for CODESIGN... " >&6; }
23775          if test ! -x "$tool_specified"; then
23776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23777$as_echo "not found" >&6; }
23778            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23779          fi
23780          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23781$as_echo "$tool_specified" >&6; }
23782        fi
23783      fi
23784    fi
23785
23786  fi
23787
23788
23789    if test "x$CODESIGN" != "x"; then
23790      # Verify that the openjdk_codesign certificate is present
23791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23792$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23793      $RM codesign-testfile
23794      $TOUCH codesign-testfile
23795      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23796      $RM codesign-testfile
23797      if test "x$CODESIGN" = x; then
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23799$as_echo "no" >&6; }
23800      else
23801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23802$as_echo "yes" >&6; }
23803      fi
23804    fi
23805
23806
23807
23808  # Publish this variable in the help.
23809
23810
23811  if [ -z "${SETFILE+x}" ]; then
23812    # The variable is not set by user, try to locate tool using the code snippet
23813    for ac_prog in SetFile
23814do
23815  # Extract the first word of "$ac_prog", so it can be a program name with args.
23816set dummy $ac_prog; ac_word=$2
23817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23818$as_echo_n "checking for $ac_word... " >&6; }
23819if ${ac_cv_path_SETFILE+:} false; then :
23820  $as_echo_n "(cached) " >&6
23821else
23822  case $SETFILE in
23823  [\\/]* | ?:[\\/]*)
23824  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23825  ;;
23826  *)
23827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23828for as_dir in $PATH
23829do
23830  IFS=$as_save_IFS
23831  test -z "$as_dir" && as_dir=.
23832    for ac_exec_ext in '' $ac_executable_extensions; do
23833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23834    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23836    break 2
23837  fi
23838done
23839  done
23840IFS=$as_save_IFS
23841
23842  ;;
23843esac
23844fi
23845SETFILE=$ac_cv_path_SETFILE
23846if test -n "$SETFILE"; then
23847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23848$as_echo "$SETFILE" >&6; }
23849else
23850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23851$as_echo "no" >&6; }
23852fi
23853
23854
23855  test -n "$SETFILE" && break
23856done
23857
23858  else
23859    # The variable is set, but is it from the command line or the environment?
23860
23861    # Try to remove the string !SETFILE! from our list.
23862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23864      # If it failed, the variable was not from the command line. Ignore it,
23865      # but warn the user (except for BASH, which is always set by the calling BASH).
23866      if test "xSETFILE" != xBASH; then
23867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23868$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23869      fi
23870      # Try to locate tool using the code snippet
23871      for ac_prog in SetFile
23872do
23873  # Extract the first word of "$ac_prog", so it can be a program name with args.
23874set dummy $ac_prog; ac_word=$2
23875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23876$as_echo_n "checking for $ac_word... " >&6; }
23877if ${ac_cv_path_SETFILE+:} false; then :
23878  $as_echo_n "(cached) " >&6
23879else
23880  case $SETFILE in
23881  [\\/]* | ?:[\\/]*)
23882  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23883  ;;
23884  *)
23885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23886for as_dir in $PATH
23887do
23888  IFS=$as_save_IFS
23889  test -z "$as_dir" && as_dir=.
23890    for ac_exec_ext in '' $ac_executable_extensions; do
23891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23892    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23894    break 2
23895  fi
23896done
23897  done
23898IFS=$as_save_IFS
23899
23900  ;;
23901esac
23902fi
23903SETFILE=$ac_cv_path_SETFILE
23904if test -n "$SETFILE"; then
23905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23906$as_echo "$SETFILE" >&6; }
23907else
23908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23909$as_echo "no" >&6; }
23910fi
23911
23912
23913  test -n "$SETFILE" && break
23914done
23915
23916    else
23917      # If it succeeded, then it was overridden by the user. We will use it
23918      # for the tool.
23919
23920      # First remove it from the list of overridden variables, so we can test
23921      # for unknown variables in the end.
23922      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23923
23924      # Check if we try to supply an empty value
23925      if test "x$SETFILE" = x; then
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23927$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23929$as_echo_n "checking for SETFILE... " >&6; }
23930        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23931$as_echo "disabled" >&6; }
23932      else
23933        # Check if the provided tool contains a complete path.
23934        tool_specified="$SETFILE"
23935        tool_basename="${tool_specified##*/}"
23936        if test "x$tool_basename" = "x$tool_specified"; then
23937          # A command without a complete path is provided, search $PATH.
23938          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23939$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23940          # Extract the first word of "$tool_basename", so it can be a program name with args.
23941set dummy $tool_basename; ac_word=$2
23942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23943$as_echo_n "checking for $ac_word... " >&6; }
23944if ${ac_cv_path_SETFILE+:} false; then :
23945  $as_echo_n "(cached) " >&6
23946else
23947  case $SETFILE in
23948  [\\/]* | ?:[\\/]*)
23949  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23950  ;;
23951  *)
23952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23953for as_dir in $PATH
23954do
23955  IFS=$as_save_IFS
23956  test -z "$as_dir" && as_dir=.
23957    for ac_exec_ext in '' $ac_executable_extensions; do
23958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23959    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23961    break 2
23962  fi
23963done
23964  done
23965IFS=$as_save_IFS
23966
23967  ;;
23968esac
23969fi
23970SETFILE=$ac_cv_path_SETFILE
23971if test -n "$SETFILE"; then
23972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23973$as_echo "$SETFILE" >&6; }
23974else
23975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23976$as_echo "no" >&6; }
23977fi
23978
23979
23980          if test "x$SETFILE" = x; then
23981            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23982          fi
23983        else
23984          # Otherwise we believe it is a complete path. Use it as it is.
23985          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23986$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23987          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23988$as_echo_n "checking for SETFILE... " >&6; }
23989          if test ! -x "$tool_specified"; then
23990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23991$as_echo "not found" >&6; }
23992            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23993          fi
23994          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23995$as_echo "$tool_specified" >&6; }
23996        fi
23997      fi
23998    fi
23999
24000  fi
24001
24002
24003
24004  if test "x$SETFILE" = x; then
24005    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24006  fi
24007
24008
24009  fi
24010
24011
24012  # Test if bash supports pipefail.
24013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24014$as_echo_n "checking if bash supports pipefail... " >&6; }
24015  if ${BASH} -c 'set -o pipefail'; then
24016    BASH_ARGS="$BASH_ARGS -o pipefail"
24017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24018$as_echo "yes" >&6; }
24019  else
24020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24021$as_echo "no" >&6; }
24022  fi
24023
24024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24025$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24026  if ${BASH} -e -c 'true'; then
24027    BASH_ARGS="$BASH_ARGS -e"
24028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24029$as_echo "yes" >&6; }
24030  else
24031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24032$as_echo "no" >&6; }
24033  fi
24034
24035
24036
24037
24038# Check if pkg-config is available.
24039
24040
24041if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24042	if test -n "$ac_tool_prefix"; then
24043  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24044set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24046$as_echo_n "checking for $ac_word... " >&6; }
24047if ${ac_cv_path_PKG_CONFIG+:} false; then :
24048  $as_echo_n "(cached) " >&6
24049else
24050  case $PKG_CONFIG in
24051  [\\/]* | ?:[\\/]*)
24052  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24053  ;;
24054  *)
24055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24056for as_dir in $PATH
24057do
24058  IFS=$as_save_IFS
24059  test -z "$as_dir" && as_dir=.
24060    for ac_exec_ext in '' $ac_executable_extensions; do
24061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24062    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24064    break 2
24065  fi
24066done
24067  done
24068IFS=$as_save_IFS
24069
24070  ;;
24071esac
24072fi
24073PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24074if test -n "$PKG_CONFIG"; then
24075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24076$as_echo "$PKG_CONFIG" >&6; }
24077else
24078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24079$as_echo "no" >&6; }
24080fi
24081
24082
24083fi
24084if test -z "$ac_cv_path_PKG_CONFIG"; then
24085  ac_pt_PKG_CONFIG=$PKG_CONFIG
24086  # Extract the first word of "pkg-config", so it can be a program name with args.
24087set dummy pkg-config; ac_word=$2
24088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24089$as_echo_n "checking for $ac_word... " >&6; }
24090if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24091  $as_echo_n "(cached) " >&6
24092else
24093  case $ac_pt_PKG_CONFIG in
24094  [\\/]* | ?:[\\/]*)
24095  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24096  ;;
24097  *)
24098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24099for as_dir in $PATH
24100do
24101  IFS=$as_save_IFS
24102  test -z "$as_dir" && as_dir=.
24103    for ac_exec_ext in '' $ac_executable_extensions; do
24104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24105    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24107    break 2
24108  fi
24109done
24110  done
24111IFS=$as_save_IFS
24112
24113  ;;
24114esac
24115fi
24116ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24117if test -n "$ac_pt_PKG_CONFIG"; then
24118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24119$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24120else
24121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24122$as_echo "no" >&6; }
24123fi
24124
24125  if test "x$ac_pt_PKG_CONFIG" = x; then
24126    PKG_CONFIG=""
24127  else
24128    case $cross_compiling:$ac_tool_warned in
24129yes:)
24130{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24131$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24132ac_tool_warned=yes ;;
24133esac
24134    PKG_CONFIG=$ac_pt_PKG_CONFIG
24135  fi
24136else
24137  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24138fi
24139
24140fi
24141if test -n "$PKG_CONFIG"; then
24142	_pkg_min_version=0.9.0
24143	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24144$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24145	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24146		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24147$as_echo "yes" >&6; }
24148	else
24149		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24150$as_echo "no" >&6; }
24151		PKG_CONFIG=""
24152	fi
24153
24154fi
24155
24156# After basic tools have been setup, we can check build os specific details.
24157
24158  ###############################################################################
24159
24160  # Note that this is the build platform OS version!
24161
24162  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24163  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24164  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24165  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24166
24167
24168
24169
24170
24171# Misc basic settings
24172
24173
24174# Check whether --with-default-make-target was given.
24175if test "${with_default_make_target+set}" = set; then :
24176  withval=$with_default_make_target;
24177fi
24178
24179  if test "x$with_default_make_target" = "x" \
24180      || test "x$with_default_make_target" = "xyes"; then
24181    DEFAULT_MAKE_TARGET="exploded-image"
24182  elif test "x$with_default_make_target" = "xno"; then
24183    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24184  else
24185    DEFAULT_MAKE_TARGET="$with_default_make_target"
24186  fi
24187
24188
24189
24190
24191###############################################################################
24192#
24193# Determine OpenJDK variants, options and version numbers.
24194#
24195###############################################################################
24196
24197# We need build & target for this.
24198
24199  # Should we build a JDK without a graphical UI?
24200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24201$as_echo_n "checking headless only... " >&6; }
24202  # Check whether --enable-headless-only was given.
24203if test "${enable_headless_only+set}" = set; then :
24204  enableval=$enable_headless_only;
24205fi
24206
24207
24208  if test "x$enable_headless_only" = "xyes"; then
24209    ENABLE_HEADLESS_ONLY="true"
24210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24211$as_echo "yes" >&6; }
24212  elif test "x$enable_headless_only" = "xno"; then
24213    ENABLE_HEADLESS_ONLY="false"
24214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24215$as_echo "no" >&6; }
24216  elif test "x$enable_headless_only" = "x"; then
24217    ENABLE_HEADLESS_ONLY="false"
24218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24219$as_echo "no" >&6; }
24220  else
24221    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24222  fi
24223
24224
24225
24226  # Choose cacerts source file
24227
24228# Check whether --with-cacerts-file was given.
24229if test "${with_cacerts_file+set}" = set; then :
24230  withval=$with_cacerts_file;
24231fi
24232
24233  if test "x$with_cacerts_file" != x; then
24234    CACERTS_FILE=$with_cacerts_file
24235  fi
24236
24237
24238  # Enable or disable unlimited crypto
24239  # Check whether --enable-unlimited-crypto was given.
24240if test "${enable_unlimited_crypto+set}" = set; then :
24241  enableval=$enable_unlimited_crypto;
24242else
24243  enable_unlimited_crypto=no
24244fi
24245
24246  if test "x$enable_unlimited_crypto" = "xyes"; then
24247    UNLIMITED_CRYPTO=true
24248  else
24249    UNLIMITED_CRYPTO=false
24250  fi
24251
24252
24253  # Should we build the serviceability agent (SA)?
24254  INCLUDE_SA=true
24255  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24256    INCLUDE_SA=false
24257  fi
24258  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24259    INCLUDE_SA=false
24260  fi
24261
24262
24263  # Compress jars
24264  COMPRESS_JARS=false
24265
24266
24267
24268  # Setup default copyright year. Mostly overridden when building close to a new year.
24269
24270# Check whether --with-copyright-year was given.
24271if test "${with_copyright_year+set}" = set; then :
24272  withval=$with_copyright_year;
24273fi
24274
24275  if test "x$with_copyright_year" = xyes; then
24276    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24277  elif test "x$with_copyright_year" != x; then
24278    COPYRIGHT_YEAR="$with_copyright_year"
24279  else
24280    COPYRIGHT_YEAR=`$DATE +'%Y'`
24281  fi
24282
24283
24284
24285  # Check whether --enable-keep-packaged-modules was given.
24286if test "${enable_keep_packaged_modules+set}" = set; then :
24287  enableval=$enable_keep_packaged_modules;
24288fi
24289
24290
24291  if test "x$enable_keep_packaged_modules" = "xyes"; then
24292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24293$as_echo_n "checking if packaged modules are kept... " >&6; }
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24295$as_echo "yes" >&6; }
24296    JLINK_KEEP_PACKAGED_MODULES=true
24297  elif test "x$enable_keep_packaged_modules" = "xno"; then
24298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24299$as_echo_n "checking if packaged modules are kept... " >&6; }
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24301$as_echo "no" >&6; }
24302    JLINK_KEEP_PACKAGED_MODULES=false
24303  elif test "x$enable_keep_packaged_modules" = "x"; then
24304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24305$as_echo "yes (default)" >&6; }
24306    JLINK_KEEP_PACKAGED_MODULES=true
24307  else
24308    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24309  fi
24310
24311
24312
24313
24314  # Warn user that old version arguments are deprecated.
24315
24316
24317# Check whether --with-milestone was given.
24318if test "${with_milestone+set}" = set; then :
24319  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24320$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24321fi
24322
24323
24324
24325
24326# Check whether --with-update-version was given.
24327if test "${with_update_version+set}" = set; then :
24328  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24329$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24330fi
24331
24332
24333
24334
24335# Check whether --with-user-release-suffix was given.
24336if test "${with_user_release_suffix+set}" = set; then :
24337  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
24338$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24339fi
24340
24341
24342
24343
24344# Check whether --with-build-number was given.
24345if test "${with_build_number+set}" = set; then :
24346  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24347$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24348fi
24349
24350
24351
24352  # Source the version numbers file
24353  . $AUTOCONF_DIR/version-numbers
24354
24355  # Some non-version number information is set in that file
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365  # Override version from arguments
24366
24367  # If --with-version-string is set, process it first. It is possible to
24368  # override parts with more specific flags, since these are processed later.
24369
24370# Check whether --with-version-string was given.
24371if test "${with_version_string+set}" = set; then :
24372  withval=$with_version_string;
24373fi
24374
24375  if test "x$with_version_string" = xyes; then
24376    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24377  elif test "x$with_version_string" != x; then
24378    # Additional [] needed to keep m4 from mangling shell constructs.
24379    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24380      VERSION_MAJOR=${BASH_REMATCH[1]}
24381      VERSION_MINOR=${BASH_REMATCH[3]}
24382      VERSION_SECURITY=${BASH_REMATCH[5]}
24383      VERSION_PATCH=${BASH_REMATCH[7]}
24384      VERSION_PRE=${BASH_REMATCH[9]}
24385      version_plus_separator=${BASH_REMATCH[11]}
24386      VERSION_BUILD=${BASH_REMATCH[12]}
24387      VERSION_OPT=${BASH_REMATCH[14]}
24388      # Unspecified numerical fields are interpreted as 0.
24389      if test "x$VERSION_MINOR" = x; then
24390        VERSION_MINOR=0
24391      fi
24392      if test "x$VERSION_SECURITY" = x; then
24393        VERSION_SECURITY=0
24394      fi
24395      if test "x$VERSION_PATCH" = x; then
24396        VERSION_PATCH=0
24397      fi
24398      if test "x$version_plus_separator" != x \
24399          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24400        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24401      fi
24402      # Stop the version part process from setting default values.
24403      # We still allow them to explicitely override though.
24404      NO_DEFAULT_VERSION_PARTS=true
24405    else
24406      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24407    fi
24408  fi
24409
24410
24411# Check whether --with-version-pre was given.
24412if test "${with_version_pre+set}" = set; then :
24413  withval=$with_version_pre; with_version_pre_present=true
24414else
24415  with_version_pre_present=false
24416fi
24417
24418
24419  if test "x$with_version_pre_present" = xtrue; then
24420    if test "x$with_version_pre" = xyes; then
24421      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24422    elif test "x$with_version_pre" = xno; then
24423      # Interpret --without-* as empty string instead of the literal "no"
24424      VERSION_PRE=
24425    else
24426      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24427       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24428      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24430$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24431      fi
24432    fi
24433  else
24434    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24435      # Default is to use "internal" as pre
24436      VERSION_PRE="internal"
24437    fi
24438  fi
24439
24440
24441# Check whether --with-version-opt was given.
24442if test "${with_version_opt+set}" = set; then :
24443  withval=$with_version_opt; with_version_opt_present=true
24444else
24445  with_version_opt_present=false
24446fi
24447
24448
24449  if test "x$with_version_opt_present" = xtrue; then
24450    if test "x$with_version_opt" = xyes; then
24451      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24452    elif test "x$with_version_opt" = xno; then
24453      # Interpret --without-* as empty string instead of the literal "no"
24454      VERSION_OPT=
24455    else
24456      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24457       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24458      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24460$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24461      fi
24462    fi
24463  else
24464    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24465      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24466      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24467      # Outer [ ] to quote m4.
24468       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24469      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24470    fi
24471  fi
24472
24473
24474# Check whether --with-version-build was given.
24475if test "${with_version_build+set}" = set; then :
24476  withval=$with_version_build; with_version_build_present=true
24477else
24478  with_version_build_present=false
24479fi
24480
24481
24482  if test "x$with_version_build_present" = xtrue; then
24483    if test "x$with_version_build" = xyes; then
24484      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24485    elif test "x$with_version_build" = xno; then
24486      # Interpret --without-* as empty string instead of the literal "no"
24487      VERSION_BUILD=
24488    elif test "x$with_version_build" = x; then
24489      VERSION_BUILD=
24490    else
24491
24492  # Additional [] needed to keep m4 from mangling shell constructs.
24493  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24494    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24495  fi
24496  # Extract the version number without leading zeros.
24497  cleaned_value=${BASH_REMATCH[1]}
24498  if test "x$cleaned_value" = x; then
24499    # Special case for zero
24500    cleaned_value=${BASH_REMATCH[2]}
24501  fi
24502
24503  if test $cleaned_value -gt 255; then
24504    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24505  fi
24506  if test "x$cleaned_value" != "x$with_version_build"; then
24507    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24508$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24509  fi
24510  VERSION_BUILD=$cleaned_value
24511
24512    fi
24513  else
24514    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24515      # Default is to not have a build number.
24516      VERSION_BUILD=""
24517      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24518      VERSION_BUILD=0
24519    fi
24520  fi
24521
24522
24523# Check whether --with-version-major was given.
24524if test "${with_version_major+set}" = set; then :
24525  withval=$with_version_major; with_version_major_present=true
24526else
24527  with_version_major_present=false
24528fi
24529
24530
24531  if test "x$with_version_major_present" = xtrue; then
24532    if test "x$with_version_major" = xyes; then
24533      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24534    else
24535
24536  # Additional [] needed to keep m4 from mangling shell constructs.
24537  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24538    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24539  fi
24540  # Extract the version number without leading zeros.
24541  cleaned_value=${BASH_REMATCH[1]}
24542  if test "x$cleaned_value" = x; then
24543    # Special case for zero
24544    cleaned_value=${BASH_REMATCH[2]}
24545  fi
24546
24547  if test $cleaned_value -gt 255; then
24548    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24549  fi
24550  if test "x$cleaned_value" != "x$with_version_major"; then
24551    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24552$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24553  fi
24554  VERSION_MAJOR=$cleaned_value
24555
24556    fi
24557  else
24558    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24559      # Default is to get value from version-numbers
24560      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24561    fi
24562  fi
24563
24564
24565# Check whether --with-version-minor was given.
24566if test "${with_version_minor+set}" = set; then :
24567  withval=$with_version_minor; with_version_minor_present=true
24568else
24569  with_version_minor_present=false
24570fi
24571
24572
24573  if test "x$with_version_minor_present" = xtrue; then
24574    if test "x$with_version_minor" = xyes; then
24575      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24576    elif test "x$with_version_minor" = xno; then
24577      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24578      VERSION_MINOR=0
24579    elif test "x$with_version_minor" = x; then
24580      VERSION_MINOR=0
24581    else
24582
24583  # Additional [] needed to keep m4 from mangling shell constructs.
24584  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24585    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24586  fi
24587  # Extract the version number without leading zeros.
24588  cleaned_value=${BASH_REMATCH[1]}
24589  if test "x$cleaned_value" = x; then
24590    # Special case for zero
24591    cleaned_value=${BASH_REMATCH[2]}
24592  fi
24593
24594  if test $cleaned_value -gt 255; then
24595    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24596  fi
24597  if test "x$cleaned_value" != "x$with_version_minor"; then
24598    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24599$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24600  fi
24601  VERSION_MINOR=$cleaned_value
24602
24603    fi
24604  else
24605    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24606      # Default is 0, if unspecified
24607      VERSION_MINOR=0
24608    fi
24609  fi
24610
24611
24612# Check whether --with-version-security was given.
24613if test "${with_version_security+set}" = set; then :
24614  withval=$with_version_security; with_version_security_present=true
24615else
24616  with_version_security_present=false
24617fi
24618
24619
24620  if test "x$with_version_security_present" = xtrue; then
24621    if test "x$with_version_security" = xyes; then
24622      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24623    elif test "x$with_version_security" = xno; then
24624      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24625      VERSION_SECURITY=0
24626    elif test "x$with_version_security" = x; then
24627      VERSION_SECURITY=0
24628    else
24629
24630  # Additional [] needed to keep m4 from mangling shell constructs.
24631  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24632    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24633  fi
24634  # Extract the version number without leading zeros.
24635  cleaned_value=${BASH_REMATCH[1]}
24636  if test "x$cleaned_value" = x; then
24637    # Special case for zero
24638    cleaned_value=${BASH_REMATCH[2]}
24639  fi
24640
24641  if test $cleaned_value -gt 255; then
24642    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24643  fi
24644  if test "x$cleaned_value" != "x$with_version_security"; then
24645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24646$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24647  fi
24648  VERSION_SECURITY=$cleaned_value
24649
24650    fi
24651  else
24652    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24653      # Default is 0, if unspecified
24654      VERSION_SECURITY=0
24655    fi
24656  fi
24657
24658
24659# Check whether --with-version-patch was given.
24660if test "${with_version_patch+set}" = set; then :
24661  withval=$with_version_patch; with_version_patch_present=true
24662else
24663  with_version_patch_present=false
24664fi
24665
24666
24667  if test "x$with_version_patch_present" = xtrue; then
24668    if test "x$with_version_patch" = xyes; then
24669      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24670    elif test "x$with_version_patch" = xno; then
24671      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24672      VERSION_PATCH=0
24673    elif test "x$with_version_patch" = x; then
24674      VERSION_PATCH=0
24675    else
24676
24677  # Additional [] needed to keep m4 from mangling shell constructs.
24678  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24679    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24680  fi
24681  # Extract the version number without leading zeros.
24682  cleaned_value=${BASH_REMATCH[1]}
24683  if test "x$cleaned_value" = x; then
24684    # Special case for zero
24685    cleaned_value=${BASH_REMATCH[2]}
24686  fi
24687
24688  if test $cleaned_value -gt 255; then
24689    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24690  fi
24691  if test "x$cleaned_value" != "x$with_version_patch"; then
24692    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24693$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24694  fi
24695  VERSION_PATCH=$cleaned_value
24696
24697    fi
24698  else
24699    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24700      # Default is 0, if unspecified
24701      VERSION_PATCH=0
24702    fi
24703  fi
24704
24705  # Calculate derived version properties
24706
24707  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24708  if test "x$VERSION_PRE" = x; then
24709    VERSION_IS_GA=true
24710  else
24711    VERSION_IS_GA=false
24712  fi
24713
24714  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24715  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24716
24717  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24718  # Strip trailing zeroes from stripped_version_number
24719  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24720  VERSION_NUMBER=$stripped_version_number
24721
24722  # The complete version string, with additional build information
24723  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24724    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24725  else
24726    # If either build or opt is set, we need a + separator
24727    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24728  fi
24729
24730  # The short version string, just VERSION_NUMBER and PRE, if present.
24731  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24732
24733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24734$as_echo_n "checking for version string... " >&6; }
24735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24736$as_echo "$VERSION_STRING" >&6; }
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752###############################################################################
24753#
24754# Setup BootJDK, used to bootstrap the build.
24755#
24756###############################################################################
24757
24758
24759  BOOT_JDK_FOUND=no
24760
24761# Check whether --with-boot-jdk was given.
24762if test "${with_boot_jdk+set}" = set; then :
24763  withval=$with_boot_jdk;
24764fi
24765
24766
24767  # We look for the Boot JDK through various means, going from more certain to
24768  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24769  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24770  # must check if this is indeed valid; otherwise we'll continue looking.
24771
24772  # Test: Is bootjdk explicitely set by command line arguments?
24773
24774  if test "x$BOOT_JDK_FOUND" = xno; then
24775    # Now execute the test
24776
24777  if test "x$with_boot_jdk" != x; then
24778    BOOT_JDK=$with_boot_jdk
24779    BOOT_JDK_FOUND=maybe
24780    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24781$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24782  fi
24783
24784
24785    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24786    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24787      # Do we have a bin/java?
24788      if test ! -x "$BOOT_JDK/bin/java"; then
24789        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24791        BOOT_JDK_FOUND=no
24792      else
24793        # Do we have a bin/javac?
24794        if test ! -x "$BOOT_JDK/bin/javac"; then
24795          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24797          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24798$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24799          BOOT_JDK_FOUND=no
24800        else
24801          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24802          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24803
24804          # Extra M4 quote needed to protect [] in grep expression.
24805          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24806          if test "x$FOUND_CORRECT_VERSION" = x; then
24807            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24810$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24811            BOOT_JDK_FOUND=no
24812          else
24813            # We're done! :-)
24814            BOOT_JDK_FOUND=yes
24815
24816  # Only process if variable expands to non-empty
24817
24818  if test "x$BOOT_JDK" != x; then
24819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24820
24821  # Input might be given as Windows format, start by converting to
24822  # unix format.
24823  path="$BOOT_JDK"
24824  new_path=`$CYGPATH -u "$path"`
24825
24826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24829  # "foo.exe" is OK but "foo" is an error.
24830  #
24831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24832  # It is also a way to make sure we got the proper file name for the real test later on.
24833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24834  if test "x$test_shortpath" = x; then
24835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24838  fi
24839
24840  # Call helper function which possibly converts this using DOS-style short mode.
24841  # If so, the updated path is stored in $new_path.
24842
24843  input_path="$new_path"
24844  # Check if we need to convert this using DOS-style short mode. If the path
24845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24846  # take no chances and rewrite it.
24847  # Note: m4 eats our [], so we need to use [ and ] instead.
24848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24849  if test "x$has_forbidden_chars" != x; then
24850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24854      # Going to short mode and back again did indeed matter. Since short mode is
24855      # case insensitive, let's make it lowercase to improve readability.
24856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24857      # Now convert it back to Unix-style (cygpath)
24858      input_path=`$CYGPATH -u "$shortmode_path"`
24859      new_path="$input_path"
24860    fi
24861  fi
24862
24863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24864  if test "x$test_cygdrive_prefix" = x; then
24865    # As a simple fix, exclude /usr/bin since it's not a real path.
24866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24868      # a path prefixed by /cygdrive for fixpath to work.
24869      new_path="$CYGWIN_ROOT_PATH$input_path"
24870    fi
24871  fi
24872
24873
24874  if test "x$path" != "x$new_path"; then
24875    BOOT_JDK="$new_path"
24876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24878  fi
24879
24880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24881
24882  path="$BOOT_JDK"
24883  has_colon=`$ECHO $path | $GREP ^.:`
24884  new_path="$path"
24885  if test "x$has_colon" = x; then
24886    # Not in mixed or Windows style, start by that.
24887    new_path=`cmd //c echo $path`
24888  fi
24889
24890
24891  input_path="$new_path"
24892  # Check if we need to convert this using DOS-style short mode. If the path
24893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24894  # take no chances and rewrite it.
24895  # Note: m4 eats our [], so we need to use [ and ] instead.
24896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24897  if test "x$has_forbidden_chars" != x; then
24898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24900  fi
24901
24902
24903  windows_path="$new_path"
24904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24905    unix_path=`$CYGPATH -u "$windows_path"`
24906    new_path="$unix_path"
24907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24909    new_path="$unix_path"
24910  fi
24911
24912  if test "x$path" != "x$new_path"; then
24913    BOOT_JDK="$new_path"
24914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24916  fi
24917
24918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24920
24921    else
24922      # We're on a unix platform. Hooray! :)
24923      path="$BOOT_JDK"
24924      has_space=`$ECHO "$path" | $GREP " "`
24925      if test "x$has_space" != x; then
24926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24928        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24929      fi
24930
24931      # Use eval to expand a potential ~
24932      eval path="$path"
24933      if test ! -f "$path" && test ! -d "$path"; then
24934        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24935      fi
24936
24937      if test -d "$path"; then
24938        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24939      else
24940        dir="`$DIRNAME "$path"`"
24941        base="`$BASENAME "$path"`"
24942        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24943      fi
24944    fi
24945  fi
24946
24947            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24948$as_echo_n "checking for Boot JDK... " >&6; }
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24950$as_echo "$BOOT_JDK" >&6; }
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24952$as_echo_n "checking Boot JDK version... " >&6; }
24953            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24955$as_echo "$BOOT_JDK_VERSION" >&6; }
24956          fi # end check jdk version
24957        fi # end check javac
24958      fi # end check java
24959    fi # end check boot jdk found
24960  fi
24961
24962  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24963    # Having specified an argument which is incorrect will produce an instant failure;
24964    # we should not go on looking
24965    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24966  fi
24967
24968  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24974    # First check at user selected default
24975
24976  if test "x$BOOT_JDK_FOUND" = xno; then
24977    # Now execute the test
24978
24979  if test -x /usr/libexec/java_home; then
24980    BOOT_JDK=`/usr/libexec/java_home `
24981    BOOT_JDK_FOUND=maybe
24982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24983$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24984  fi
24985
24986
24987    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24988    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24989      # Do we have a bin/java?
24990      if test ! -x "$BOOT_JDK/bin/java"; then
24991        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24993        BOOT_JDK_FOUND=no
24994      else
24995        # Do we have a bin/javac?
24996        if test ! -x "$BOOT_JDK/bin/javac"; then
24997          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25000$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25001          BOOT_JDK_FOUND=no
25002        else
25003          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25004          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25005
25006          # Extra M4 quote needed to protect [] in grep expression.
25007          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25008          if test "x$FOUND_CORRECT_VERSION" = x; then
25009            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25012$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25013            BOOT_JDK_FOUND=no
25014          else
25015            # We're done! :-)
25016            BOOT_JDK_FOUND=yes
25017
25018  # Only process if variable expands to non-empty
25019
25020  if test "x$BOOT_JDK" != x; then
25021    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25022
25023  # Input might be given as Windows format, start by converting to
25024  # unix format.
25025  path="$BOOT_JDK"
25026  new_path=`$CYGPATH -u "$path"`
25027
25028  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25029  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25030  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25031  # "foo.exe" is OK but "foo" is an error.
25032  #
25033  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25034  # It is also a way to make sure we got the proper file name for the real test later on.
25035  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25036  if test "x$test_shortpath" = x; then
25037    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25039    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25040  fi
25041
25042  # Call helper function which possibly converts this using DOS-style short mode.
25043  # If so, the updated path is stored in $new_path.
25044
25045  input_path="$new_path"
25046  # Check if we need to convert this using DOS-style short mode. If the path
25047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25048  # take no chances and rewrite it.
25049  # Note: m4 eats our [], so we need to use [ and ] instead.
25050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25051  if test "x$has_forbidden_chars" != x; then
25052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25053    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25054    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25055    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25056      # Going to short mode and back again did indeed matter. Since short mode is
25057      # case insensitive, let's make it lowercase to improve readability.
25058      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25059      # Now convert it back to Unix-style (cygpath)
25060      input_path=`$CYGPATH -u "$shortmode_path"`
25061      new_path="$input_path"
25062    fi
25063  fi
25064
25065  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25066  if test "x$test_cygdrive_prefix" = x; then
25067    # As a simple fix, exclude /usr/bin since it's not a real path.
25068    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25069      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25070      # a path prefixed by /cygdrive for fixpath to work.
25071      new_path="$CYGWIN_ROOT_PATH$input_path"
25072    fi
25073  fi
25074
25075
25076  if test "x$path" != "x$new_path"; then
25077    BOOT_JDK="$new_path"
25078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25079$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25080  fi
25081
25082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25083
25084  path="$BOOT_JDK"
25085  has_colon=`$ECHO $path | $GREP ^.:`
25086  new_path="$path"
25087  if test "x$has_colon" = x; then
25088    # Not in mixed or Windows style, start by that.
25089    new_path=`cmd //c echo $path`
25090  fi
25091
25092
25093  input_path="$new_path"
25094  # Check if we need to convert this using DOS-style short mode. If the path
25095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25096  # take no chances and rewrite it.
25097  # Note: m4 eats our [], so we need to use [ and ] instead.
25098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25099  if test "x$has_forbidden_chars" != x; then
25100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25101    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25102  fi
25103
25104
25105  windows_path="$new_path"
25106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25107    unix_path=`$CYGPATH -u "$windows_path"`
25108    new_path="$unix_path"
25109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25110    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25111    new_path="$unix_path"
25112  fi
25113
25114  if test "x$path" != "x$new_path"; then
25115    BOOT_JDK="$new_path"
25116    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25117$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25118  fi
25119
25120  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25121  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25122
25123    else
25124      # We're on a unix platform. Hooray! :)
25125      path="$BOOT_JDK"
25126      has_space=`$ECHO "$path" | $GREP " "`
25127      if test "x$has_space" != x; then
25128        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25129$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25130        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25131      fi
25132
25133      # Use eval to expand a potential ~
25134      eval path="$path"
25135      if test ! -f "$path" && test ! -d "$path"; then
25136        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25137      fi
25138
25139      if test -d "$path"; then
25140        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25141      else
25142        dir="`$DIRNAME "$path"`"
25143        base="`$BASENAME "$path"`"
25144        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25145      fi
25146    fi
25147  fi
25148
25149            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25150$as_echo_n "checking for Boot JDK... " >&6; }
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25152$as_echo "$BOOT_JDK" >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25154$as_echo_n "checking Boot JDK version... " >&6; }
25155            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25157$as_echo "$BOOT_JDK_VERSION" >&6; }
25158          fi # end check jdk version
25159        fi # end check javac
25160      fi # end check java
25161    fi # end check boot jdk found
25162  fi
25163
25164    # If that did not work out (e.g. too old), try explicit versions instead
25165
25166  if test "x$BOOT_JDK_FOUND" = xno; then
25167    # Now execute the test
25168
25169  if test -x /usr/libexec/java_home; then
25170    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25171    BOOT_JDK_FOUND=maybe
25172    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25173$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25174  fi
25175
25176
25177    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25178    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25179      # Do we have a bin/java?
25180      if test ! -x "$BOOT_JDK/bin/java"; then
25181        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25182$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25183        BOOT_JDK_FOUND=no
25184      else
25185        # Do we have a bin/javac?
25186        if test ! -x "$BOOT_JDK/bin/javac"; then
25187          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25190$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25191          BOOT_JDK_FOUND=no
25192        else
25193          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25194          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25195
25196          # Extra M4 quote needed to protect [] in grep expression.
25197          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25198          if test "x$FOUND_CORRECT_VERSION" = x; then
25199            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25202$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25203            BOOT_JDK_FOUND=no
25204          else
25205            # We're done! :-)
25206            BOOT_JDK_FOUND=yes
25207
25208  # Only process if variable expands to non-empty
25209
25210  if test "x$BOOT_JDK" != x; then
25211    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25212
25213  # Input might be given as Windows format, start by converting to
25214  # unix format.
25215  path="$BOOT_JDK"
25216  new_path=`$CYGPATH -u "$path"`
25217
25218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25221  # "foo.exe" is OK but "foo" is an error.
25222  #
25223  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25224  # It is also a way to make sure we got the proper file name for the real test later on.
25225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25226  if test "x$test_shortpath" = x; then
25227    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25228$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25229    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25230  fi
25231
25232  # Call helper function which possibly converts this using DOS-style short mode.
25233  # If so, the updated path is stored in $new_path.
25234
25235  input_path="$new_path"
25236  # Check if we need to convert this using DOS-style short mode. If the path
25237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25238  # take no chances and rewrite it.
25239  # Note: m4 eats our [], so we need to use [ and ] instead.
25240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25241  if test "x$has_forbidden_chars" != x; then
25242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25246      # Going to short mode and back again did indeed matter. Since short mode is
25247      # case insensitive, let's make it lowercase to improve readability.
25248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25249      # Now convert it back to Unix-style (cygpath)
25250      input_path=`$CYGPATH -u "$shortmode_path"`
25251      new_path="$input_path"
25252    fi
25253  fi
25254
25255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25256  if test "x$test_cygdrive_prefix" = x; then
25257    # As a simple fix, exclude /usr/bin since it's not a real path.
25258    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25260      # a path prefixed by /cygdrive for fixpath to work.
25261      new_path="$CYGWIN_ROOT_PATH$input_path"
25262    fi
25263  fi
25264
25265
25266  if test "x$path" != "x$new_path"; then
25267    BOOT_JDK="$new_path"
25268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25270  fi
25271
25272    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25273
25274  path="$BOOT_JDK"
25275  has_colon=`$ECHO $path | $GREP ^.:`
25276  new_path="$path"
25277  if test "x$has_colon" = x; then
25278    # Not in mixed or Windows style, start by that.
25279    new_path=`cmd //c echo $path`
25280  fi
25281
25282
25283  input_path="$new_path"
25284  # Check if we need to convert this using DOS-style short mode. If the path
25285  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25286  # take no chances and rewrite it.
25287  # Note: m4 eats our [], so we need to use [ and ] instead.
25288  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25289  if test "x$has_forbidden_chars" != x; then
25290    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25291    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25292  fi
25293
25294
25295  windows_path="$new_path"
25296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25297    unix_path=`$CYGPATH -u "$windows_path"`
25298    new_path="$unix_path"
25299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25300    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25301    new_path="$unix_path"
25302  fi
25303
25304  if test "x$path" != "x$new_path"; then
25305    BOOT_JDK="$new_path"
25306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25308  fi
25309
25310  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25311  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25312
25313    else
25314      # We're on a unix platform. Hooray! :)
25315      path="$BOOT_JDK"
25316      has_space=`$ECHO "$path" | $GREP " "`
25317      if test "x$has_space" != x; then
25318        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25320        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25321      fi
25322
25323      # Use eval to expand a potential ~
25324      eval path="$path"
25325      if test ! -f "$path" && test ! -d "$path"; then
25326        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25327      fi
25328
25329      if test -d "$path"; then
25330        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25331      else
25332        dir="`$DIRNAME "$path"`"
25333        base="`$BASENAME "$path"`"
25334        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25335      fi
25336    fi
25337  fi
25338
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25340$as_echo_n "checking for Boot JDK... " >&6; }
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25342$as_echo "$BOOT_JDK" >&6; }
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25344$as_echo_n "checking Boot JDK version... " >&6; }
25345            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25347$as_echo "$BOOT_JDK_VERSION" >&6; }
25348          fi # end check jdk version
25349        fi # end check javac
25350      fi # end check java
25351    fi # end check boot jdk found
25352  fi
25353
25354
25355  if test "x$BOOT_JDK_FOUND" = xno; then
25356    # Now execute the test
25357
25358  if test -x /usr/libexec/java_home; then
25359    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25360    BOOT_JDK_FOUND=maybe
25361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25362$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25363  fi
25364
25365
25366    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25367    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25368      # Do we have a bin/java?
25369      if test ! -x "$BOOT_JDK/bin/java"; then
25370        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25372        BOOT_JDK_FOUND=no
25373      else
25374        # Do we have a bin/javac?
25375        if test ! -x "$BOOT_JDK/bin/javac"; then
25376          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25377$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25379$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25380          BOOT_JDK_FOUND=no
25381        else
25382          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25383          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25384
25385          # Extra M4 quote needed to protect [] in grep expression.
25386          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25387          if test "x$FOUND_CORRECT_VERSION" = x; then
25388            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25392            BOOT_JDK_FOUND=no
25393          else
25394            # We're done! :-)
25395            BOOT_JDK_FOUND=yes
25396
25397  # Only process if variable expands to non-empty
25398
25399  if test "x$BOOT_JDK" != x; then
25400    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401
25402  # Input might be given as Windows format, start by converting to
25403  # unix format.
25404  path="$BOOT_JDK"
25405  new_path=`$CYGPATH -u "$path"`
25406
25407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25410  # "foo.exe" is OK but "foo" is an error.
25411  #
25412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25413  # It is also a way to make sure we got the proper file name for the real test later on.
25414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25415  if test "x$test_shortpath" = x; then
25416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25419  fi
25420
25421  # Call helper function which possibly converts this using DOS-style short mode.
25422  # If so, the updated path is stored in $new_path.
25423
25424  input_path="$new_path"
25425  # Check if we need to convert this using DOS-style short mode. If the path
25426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25427  # take no chances and rewrite it.
25428  # Note: m4 eats our [], so we need to use [ and ] instead.
25429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25430  if test "x$has_forbidden_chars" != x; then
25431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25435      # Going to short mode and back again did indeed matter. Since short mode is
25436      # case insensitive, let's make it lowercase to improve readability.
25437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25438      # Now convert it back to Unix-style (cygpath)
25439      input_path=`$CYGPATH -u "$shortmode_path"`
25440      new_path="$input_path"
25441    fi
25442  fi
25443
25444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25445  if test "x$test_cygdrive_prefix" = x; then
25446    # As a simple fix, exclude /usr/bin since it's not a real path.
25447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25449      # a path prefixed by /cygdrive for fixpath to work.
25450      new_path="$CYGWIN_ROOT_PATH$input_path"
25451    fi
25452  fi
25453
25454
25455  if test "x$path" != "x$new_path"; then
25456    BOOT_JDK="$new_path"
25457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25459  fi
25460
25461    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25462
25463  path="$BOOT_JDK"
25464  has_colon=`$ECHO $path | $GREP ^.:`
25465  new_path="$path"
25466  if test "x$has_colon" = x; then
25467    # Not in mixed or Windows style, start by that.
25468    new_path=`cmd //c echo $path`
25469  fi
25470
25471
25472  input_path="$new_path"
25473  # Check if we need to convert this using DOS-style short mode. If the path
25474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25475  # take no chances and rewrite it.
25476  # Note: m4 eats our [], so we need to use [ and ] instead.
25477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25478  if test "x$has_forbidden_chars" != x; then
25479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25481  fi
25482
25483
25484  windows_path="$new_path"
25485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25486    unix_path=`$CYGPATH -u "$windows_path"`
25487    new_path="$unix_path"
25488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25490    new_path="$unix_path"
25491  fi
25492
25493  if test "x$path" != "x$new_path"; then
25494    BOOT_JDK="$new_path"
25495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25497  fi
25498
25499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25501
25502    else
25503      # We're on a unix platform. Hooray! :)
25504      path="$BOOT_JDK"
25505      has_space=`$ECHO "$path" | $GREP " "`
25506      if test "x$has_space" != x; then
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25508$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25509        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25510      fi
25511
25512      # Use eval to expand a potential ~
25513      eval path="$path"
25514      if test ! -f "$path" && test ! -d "$path"; then
25515        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25516      fi
25517
25518      if test -d "$path"; then
25519        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25520      else
25521        dir="`$DIRNAME "$path"`"
25522        base="`$BASENAME "$path"`"
25523        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25524      fi
25525    fi
25526  fi
25527
25528            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25529$as_echo_n "checking for Boot JDK... " >&6; }
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25531$as_echo "$BOOT_JDK" >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25533$as_echo_n "checking Boot JDK version... " >&6; }
25534            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25535            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25536$as_echo "$BOOT_JDK_VERSION" >&6; }
25537          fi # end check jdk version
25538        fi # end check javac
25539      fi # end check java
25540    fi # end check boot jdk found
25541  fi
25542
25543
25544  if test "x$BOOT_JDK_FOUND" = xno; then
25545    # Now execute the test
25546
25547  if test -x /usr/libexec/java_home; then
25548    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25549    BOOT_JDK_FOUND=maybe
25550    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25551$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25552  fi
25553
25554
25555    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25556    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25557      # Do we have a bin/java?
25558      if test ! -x "$BOOT_JDK/bin/java"; then
25559        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25561        BOOT_JDK_FOUND=no
25562      else
25563        # Do we have a bin/javac?
25564        if test ! -x "$BOOT_JDK/bin/javac"; then
25565          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25566$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25567          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25568$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25569          BOOT_JDK_FOUND=no
25570        else
25571          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25572          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25573
25574          # Extra M4 quote needed to protect [] in grep expression.
25575          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25576          if test "x$FOUND_CORRECT_VERSION" = x; then
25577            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25579            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25580$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25581            BOOT_JDK_FOUND=no
25582          else
25583            # We're done! :-)
25584            BOOT_JDK_FOUND=yes
25585
25586  # Only process if variable expands to non-empty
25587
25588  if test "x$BOOT_JDK" != x; then
25589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25590
25591  # Input might be given as Windows format, start by converting to
25592  # unix format.
25593  path="$BOOT_JDK"
25594  new_path=`$CYGPATH -u "$path"`
25595
25596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25599  # "foo.exe" is OK but "foo" is an error.
25600  #
25601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25602  # It is also a way to make sure we got the proper file name for the real test later on.
25603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25604  if test "x$test_shortpath" = x; then
25605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25607    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25608  fi
25609
25610  # Call helper function which possibly converts this using DOS-style short mode.
25611  # If so, the updated path is stored in $new_path.
25612
25613  input_path="$new_path"
25614  # Check if we need to convert this using DOS-style short mode. If the path
25615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25616  # take no chances and rewrite it.
25617  # Note: m4 eats our [], so we need to use [ and ] instead.
25618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25619  if test "x$has_forbidden_chars" != x; then
25620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25624      # Going to short mode and back again did indeed matter. Since short mode is
25625      # case insensitive, let's make it lowercase to improve readability.
25626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25627      # Now convert it back to Unix-style (cygpath)
25628      input_path=`$CYGPATH -u "$shortmode_path"`
25629      new_path="$input_path"
25630    fi
25631  fi
25632
25633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25634  if test "x$test_cygdrive_prefix" = x; then
25635    # As a simple fix, exclude /usr/bin since it's not a real path.
25636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25638      # a path prefixed by /cygdrive for fixpath to work.
25639      new_path="$CYGWIN_ROOT_PATH$input_path"
25640    fi
25641  fi
25642
25643
25644  if test "x$path" != "x$new_path"; then
25645    BOOT_JDK="$new_path"
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25648  fi
25649
25650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25651
25652  path="$BOOT_JDK"
25653  has_colon=`$ECHO $path | $GREP ^.:`
25654  new_path="$path"
25655  if test "x$has_colon" = x; then
25656    # Not in mixed or Windows style, start by that.
25657    new_path=`cmd //c echo $path`
25658  fi
25659
25660
25661  input_path="$new_path"
25662  # Check if we need to convert this using DOS-style short mode. If the path
25663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25664  # take no chances and rewrite it.
25665  # Note: m4 eats our [], so we need to use [ and ] instead.
25666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25667  if test "x$has_forbidden_chars" != x; then
25668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25670  fi
25671
25672
25673  windows_path="$new_path"
25674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25675    unix_path=`$CYGPATH -u "$windows_path"`
25676    new_path="$unix_path"
25677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25679    new_path="$unix_path"
25680  fi
25681
25682  if test "x$path" != "x$new_path"; then
25683    BOOT_JDK="$new_path"
25684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25686  fi
25687
25688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25690
25691    else
25692      # We're on a unix platform. Hooray! :)
25693      path="$BOOT_JDK"
25694      has_space=`$ECHO "$path" | $GREP " "`
25695      if test "x$has_space" != x; then
25696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25697$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25699      fi
25700
25701      # Use eval to expand a potential ~
25702      eval path="$path"
25703      if test ! -f "$path" && test ! -d "$path"; then
25704        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25705      fi
25706
25707      if test -d "$path"; then
25708        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25709      else
25710        dir="`$DIRNAME "$path"`"
25711        base="`$BASENAME "$path"`"
25712        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25713      fi
25714    fi
25715  fi
25716
25717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25718$as_echo_n "checking for Boot JDK... " >&6; }
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25720$as_echo "$BOOT_JDK" >&6; }
25721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25722$as_echo_n "checking Boot JDK version... " >&6; }
25723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25725$as_echo "$BOOT_JDK_VERSION" >&6; }
25726          fi # end check jdk version
25727        fi # end check javac
25728      fi # end check java
25729    fi # end check boot jdk found
25730  fi
25731
25732  fi
25733
25734
25735    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25736    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25737      # Do we have a bin/java?
25738      if test ! -x "$BOOT_JDK/bin/java"; then
25739        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25741        BOOT_JDK_FOUND=no
25742      else
25743        # Do we have a bin/javac?
25744        if test ! -x "$BOOT_JDK/bin/javac"; then
25745          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25747          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25748$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25749          BOOT_JDK_FOUND=no
25750        else
25751          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25752          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25753
25754          # Extra M4 quote needed to protect [] in grep expression.
25755          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25756          if test "x$FOUND_CORRECT_VERSION" = x; then
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25760$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25761            BOOT_JDK_FOUND=no
25762          else
25763            # We're done! :-)
25764            BOOT_JDK_FOUND=yes
25765
25766  # Only process if variable expands to non-empty
25767
25768  if test "x$BOOT_JDK" != x; then
25769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25770
25771  # Input might be given as Windows format, start by converting to
25772  # unix format.
25773  path="$BOOT_JDK"
25774  new_path=`$CYGPATH -u "$path"`
25775
25776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25779  # "foo.exe" is OK but "foo" is an error.
25780  #
25781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25782  # It is also a way to make sure we got the proper file name for the real test later on.
25783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25784  if test "x$test_shortpath" = x; then
25785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25787    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25788  fi
25789
25790  # Call helper function which possibly converts this using DOS-style short mode.
25791  # If so, the updated path is stored in $new_path.
25792
25793  input_path="$new_path"
25794  # Check if we need to convert this using DOS-style short mode. If the path
25795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25796  # take no chances and rewrite it.
25797  # Note: m4 eats our [], so we need to use [ and ] instead.
25798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25799  if test "x$has_forbidden_chars" != x; then
25800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25804      # Going to short mode and back again did indeed matter. Since short mode is
25805      # case insensitive, let's make it lowercase to improve readability.
25806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25807      # Now convert it back to Unix-style (cygpath)
25808      input_path=`$CYGPATH -u "$shortmode_path"`
25809      new_path="$input_path"
25810    fi
25811  fi
25812
25813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25814  if test "x$test_cygdrive_prefix" = x; then
25815    # As a simple fix, exclude /usr/bin since it's not a real path.
25816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25818      # a path prefixed by /cygdrive for fixpath to work.
25819      new_path="$CYGWIN_ROOT_PATH$input_path"
25820    fi
25821  fi
25822
25823
25824  if test "x$path" != "x$new_path"; then
25825    BOOT_JDK="$new_path"
25826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25828  fi
25829
25830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25831
25832  path="$BOOT_JDK"
25833  has_colon=`$ECHO $path | $GREP ^.:`
25834  new_path="$path"
25835  if test "x$has_colon" = x; then
25836    # Not in mixed or Windows style, start by that.
25837    new_path=`cmd //c echo $path`
25838  fi
25839
25840
25841  input_path="$new_path"
25842  # Check if we need to convert this using DOS-style short mode. If the path
25843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25844  # take no chances and rewrite it.
25845  # Note: m4 eats our [], so we need to use [ and ] instead.
25846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25847  if test "x$has_forbidden_chars" != x; then
25848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25850  fi
25851
25852
25853  windows_path="$new_path"
25854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25855    unix_path=`$CYGPATH -u "$windows_path"`
25856    new_path="$unix_path"
25857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25859    new_path="$unix_path"
25860  fi
25861
25862  if test "x$path" != "x$new_path"; then
25863    BOOT_JDK="$new_path"
25864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25866  fi
25867
25868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25870
25871    else
25872      # We're on a unix platform. Hooray! :)
25873      path="$BOOT_JDK"
25874      has_space=`$ECHO "$path" | $GREP " "`
25875      if test "x$has_space" != x; then
25876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25879      fi
25880
25881      # Use eval to expand a potential ~
25882      eval path="$path"
25883      if test ! -f "$path" && test ! -d "$path"; then
25884        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25885      fi
25886
25887      if test -d "$path"; then
25888        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25889      else
25890        dir="`$DIRNAME "$path"`"
25891        base="`$BASENAME "$path"`"
25892        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25893      fi
25894    fi
25895  fi
25896
25897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25898$as_echo_n "checking for Boot JDK... " >&6; }
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25900$as_echo "$BOOT_JDK" >&6; }
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25902$as_echo_n "checking Boot JDK version... " >&6; }
25903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25905$as_echo "$BOOT_JDK_VERSION" >&6; }
25906          fi # end check jdk version
25907        fi # end check javac
25908      fi # end check java
25909    fi # end check boot jdk found
25910  fi
25911
25912
25913  # Test: Is $JAVA_HOME set?
25914
25915  if test "x$BOOT_JDK_FOUND" = xno; then
25916    # Now execute the test
25917
25918  if test "x$JAVA_HOME" != x; then
25919    JAVA_HOME_PROCESSED="$JAVA_HOME"
25920
25921  # Only process if variable expands to non-empty
25922
25923  if test "x$JAVA_HOME_PROCESSED" != x; then
25924    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25925
25926  # Input might be given as Windows format, start by converting to
25927  # unix format.
25928  path="$JAVA_HOME_PROCESSED"
25929  new_path=`$CYGPATH -u "$path"`
25930
25931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25934  # "foo.exe" is OK but "foo" is an error.
25935  #
25936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25937  # It is also a way to make sure we got the proper file name for the real test later on.
25938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25939  if test "x$test_shortpath" = x; then
25940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25941$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25942    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25943  fi
25944
25945  # Call helper function which possibly converts this using DOS-style short mode.
25946  # If so, the updated path is stored in $new_path.
25947
25948  input_path="$new_path"
25949  # Check if we need to convert this using DOS-style short mode. If the path
25950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25951  # take no chances and rewrite it.
25952  # Note: m4 eats our [], so we need to use [ and ] instead.
25953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25954  if test "x$has_forbidden_chars" != x; then
25955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25959      # Going to short mode and back again did indeed matter. Since short mode is
25960      # case insensitive, let's make it lowercase to improve readability.
25961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25962      # Now convert it back to Unix-style (cygpath)
25963      input_path=`$CYGPATH -u "$shortmode_path"`
25964      new_path="$input_path"
25965    fi
25966  fi
25967
25968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25969  if test "x$test_cygdrive_prefix" = x; then
25970    # As a simple fix, exclude /usr/bin since it's not a real path.
25971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25973      # a path prefixed by /cygdrive for fixpath to work.
25974      new_path="$CYGWIN_ROOT_PATH$input_path"
25975    fi
25976  fi
25977
25978
25979  if test "x$path" != "x$new_path"; then
25980    JAVA_HOME_PROCESSED="$new_path"
25981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25982$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25983  fi
25984
25985    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25986
25987  path="$JAVA_HOME_PROCESSED"
25988  has_colon=`$ECHO $path | $GREP ^.:`
25989  new_path="$path"
25990  if test "x$has_colon" = x; then
25991    # Not in mixed or Windows style, start by that.
25992    new_path=`cmd //c echo $path`
25993  fi
25994
25995
25996  input_path="$new_path"
25997  # Check if we need to convert this using DOS-style short mode. If the path
25998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25999  # take no chances and rewrite it.
26000  # Note: m4 eats our [], so we need to use [ and ] instead.
26001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26002  if test "x$has_forbidden_chars" != x; then
26003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26005  fi
26006
26007
26008  windows_path="$new_path"
26009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26010    unix_path=`$CYGPATH -u "$windows_path"`
26011    new_path="$unix_path"
26012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26014    new_path="$unix_path"
26015  fi
26016
26017  if test "x$path" != "x$new_path"; then
26018    JAVA_HOME_PROCESSED="$new_path"
26019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26020$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26021  fi
26022
26023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26025
26026    else
26027      # We're on a unix platform. Hooray! :)
26028      path="$JAVA_HOME_PROCESSED"
26029      has_space=`$ECHO "$path" | $GREP " "`
26030      if test "x$has_space" != x; then
26031        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26032$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26033        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26034      fi
26035
26036      # Use eval to expand a potential ~
26037      eval path="$path"
26038      if test ! -f "$path" && test ! -d "$path"; then
26039        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26040      fi
26041
26042      if test -d "$path"; then
26043        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26044      else
26045        dir="`$DIRNAME "$path"`"
26046        base="`$BASENAME "$path"`"
26047        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26048      fi
26049    fi
26050  fi
26051
26052    if test ! -d "$JAVA_HOME_PROCESSED"; then
26053      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26054$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26055    else
26056      # Aha, the user has set a JAVA_HOME
26057      # let us use that as the Boot JDK.
26058      BOOT_JDK="$JAVA_HOME_PROCESSED"
26059      BOOT_JDK_FOUND=maybe
26060      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26061$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26062    fi
26063  fi
26064
26065
26066    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26067    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26068      # Do we have a bin/java?
26069      if test ! -x "$BOOT_JDK/bin/java"; then
26070        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26071$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26072        BOOT_JDK_FOUND=no
26073      else
26074        # Do we have a bin/javac?
26075        if test ! -x "$BOOT_JDK/bin/javac"; then
26076          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26077$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26078          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26079$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26080          BOOT_JDK_FOUND=no
26081        else
26082          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26083          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26084
26085          # Extra M4 quote needed to protect [] in grep expression.
26086          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26087          if test "x$FOUND_CORRECT_VERSION" = x; then
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26091$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26092            BOOT_JDK_FOUND=no
26093          else
26094            # We're done! :-)
26095            BOOT_JDK_FOUND=yes
26096
26097  # Only process if variable expands to non-empty
26098
26099  if test "x$BOOT_JDK" != x; then
26100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26101
26102  # Input might be given as Windows format, start by converting to
26103  # unix format.
26104  path="$BOOT_JDK"
26105  new_path=`$CYGPATH -u "$path"`
26106
26107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26110  # "foo.exe" is OK but "foo" is an error.
26111  #
26112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26113  # It is also a way to make sure we got the proper file name for the real test later on.
26114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26115  if test "x$test_shortpath" = x; then
26116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26117$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26118    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26119  fi
26120
26121  # Call helper function which possibly converts this using DOS-style short mode.
26122  # If so, the updated path is stored in $new_path.
26123
26124  input_path="$new_path"
26125  # Check if we need to convert this using DOS-style short mode. If the path
26126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26127  # take no chances and rewrite it.
26128  # Note: m4 eats our [], so we need to use [ and ] instead.
26129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26130  if test "x$has_forbidden_chars" != x; then
26131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26135      # Going to short mode and back again did indeed matter. Since short mode is
26136      # case insensitive, let's make it lowercase to improve readability.
26137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26138      # Now convert it back to Unix-style (cygpath)
26139      input_path=`$CYGPATH -u "$shortmode_path"`
26140      new_path="$input_path"
26141    fi
26142  fi
26143
26144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26145  if test "x$test_cygdrive_prefix" = x; then
26146    # As a simple fix, exclude /usr/bin since it's not a real path.
26147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26149      # a path prefixed by /cygdrive for fixpath to work.
26150      new_path="$CYGWIN_ROOT_PATH$input_path"
26151    fi
26152  fi
26153
26154
26155  if test "x$path" != "x$new_path"; then
26156    BOOT_JDK="$new_path"
26157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26159  fi
26160
26161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26162
26163  path="$BOOT_JDK"
26164  has_colon=`$ECHO $path | $GREP ^.:`
26165  new_path="$path"
26166  if test "x$has_colon" = x; then
26167    # Not in mixed or Windows style, start by that.
26168    new_path=`cmd //c echo $path`
26169  fi
26170
26171
26172  input_path="$new_path"
26173  # Check if we need to convert this using DOS-style short mode. If the path
26174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26175  # take no chances and rewrite it.
26176  # Note: m4 eats our [], so we need to use [ and ] instead.
26177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26178  if test "x$has_forbidden_chars" != x; then
26179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26181  fi
26182
26183
26184  windows_path="$new_path"
26185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26186    unix_path=`$CYGPATH -u "$windows_path"`
26187    new_path="$unix_path"
26188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26190    new_path="$unix_path"
26191  fi
26192
26193  if test "x$path" != "x$new_path"; then
26194    BOOT_JDK="$new_path"
26195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26196$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26197  fi
26198
26199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26201
26202    else
26203      # We're on a unix platform. Hooray! :)
26204      path="$BOOT_JDK"
26205      has_space=`$ECHO "$path" | $GREP " "`
26206      if test "x$has_space" != x; then
26207        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26208$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26209        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26210      fi
26211
26212      # Use eval to expand a potential ~
26213      eval path="$path"
26214      if test ! -f "$path" && test ! -d "$path"; then
26215        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26216      fi
26217
26218      if test -d "$path"; then
26219        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26220      else
26221        dir="`$DIRNAME "$path"`"
26222        base="`$BASENAME "$path"`"
26223        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26224      fi
26225    fi
26226  fi
26227
26228            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26229$as_echo_n "checking for Boot JDK... " >&6; }
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26231$as_echo "$BOOT_JDK" >&6; }
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26233$as_echo_n "checking Boot JDK version... " >&6; }
26234            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26236$as_echo "$BOOT_JDK_VERSION" >&6; }
26237          fi # end check jdk version
26238        fi # end check javac
26239      fi # end check java
26240    fi # end check boot jdk found
26241  fi
26242
26243
26244  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26245
26246  if test "x$BOOT_JDK_FOUND" = xno; then
26247    # Now execute the test
26248
26249  # Extract the first word of "javac", so it can be a program name with args.
26250set dummy javac; ac_word=$2
26251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26252$as_echo_n "checking for $ac_word... " >&6; }
26253if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26254  $as_echo_n "(cached) " >&6
26255else
26256  case $JAVAC_CHECK in
26257  [\\/]* | ?:[\\/]*)
26258  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26259  ;;
26260  *)
26261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26262for as_dir in $PATH
26263do
26264  IFS=$as_save_IFS
26265  test -z "$as_dir" && as_dir=.
26266    for ac_exec_ext in '' $ac_executable_extensions; do
26267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26268    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26270    break 2
26271  fi
26272done
26273  done
26274IFS=$as_save_IFS
26275
26276  ;;
26277esac
26278fi
26279JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26280if test -n "$JAVAC_CHECK"; then
26281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26282$as_echo "$JAVAC_CHECK" >&6; }
26283else
26284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26285$as_echo "no" >&6; }
26286fi
26287
26288
26289  # Extract the first word of "java", so it can be a program name with args.
26290set dummy java; ac_word=$2
26291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26292$as_echo_n "checking for $ac_word... " >&6; }
26293if ${ac_cv_path_JAVA_CHECK+:} false; then :
26294  $as_echo_n "(cached) " >&6
26295else
26296  case $JAVA_CHECK in
26297  [\\/]* | ?:[\\/]*)
26298  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26299  ;;
26300  *)
26301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26302for as_dir in $PATH
26303do
26304  IFS=$as_save_IFS
26305  test -z "$as_dir" && as_dir=.
26306    for ac_exec_ext in '' $ac_executable_extensions; do
26307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26308    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26310    break 2
26311  fi
26312done
26313  done
26314IFS=$as_save_IFS
26315
26316  ;;
26317esac
26318fi
26319JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26320if test -n "$JAVA_CHECK"; then
26321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26322$as_echo "$JAVA_CHECK" >&6; }
26323else
26324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26325$as_echo "no" >&6; }
26326fi
26327
26328
26329  BINARY="$JAVAC_CHECK"
26330  if test "x$JAVAC_CHECK" = x; then
26331    BINARY="$JAVA_CHECK"
26332  fi
26333  if test "x$BINARY" != x; then
26334    # So there is a java(c) binary, it might be part of a JDK.
26335    # Lets find the JDK/JRE directory by following symbolic links.
26336    # Linux/GNU systems often have links from /usr/bin/java to
26337    # /etc/alternatives/java to the real JDK binary.
26338
26339  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26340    # Follow a chain of symbolic links. Use readlink
26341    # where it exists, else fall back to horribly
26342    # complicated shell code.
26343    if test "x$READLINK_TESTED" != yes; then
26344      # On MacOSX there is a readlink tool with a different
26345      # purpose than the GNU readlink tool. Check the found readlink.
26346      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26347      if test "x$ISGNU" = x; then
26348        # A readlink that we do not know how to use.
26349        # Are there other non-GNU readlinks out there?
26350        READLINK_TESTED=yes
26351        READLINK=
26352      fi
26353    fi
26354
26355    if test "x$READLINK" != x; then
26356      BINARY=`$READLINK -f $BINARY`
26357    else
26358      # Save the current directory for restoring afterwards
26359      STARTDIR=$PWD
26360      COUNTER=0
26361      sym_link_dir=`$DIRNAME $BINARY`
26362      sym_link_file=`$BASENAME $BINARY`
26363      cd $sym_link_dir
26364      # Use -P flag to resolve symlinks in directories.
26365      cd `$THEPWDCMD -P`
26366      sym_link_dir=`$THEPWDCMD -P`
26367      # Resolve file symlinks
26368      while test $COUNTER -lt 20; do
26369        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26370        if test "x$ISLINK" == x; then
26371          # This is not a symbolic link! We are done!
26372          break
26373        fi
26374        # Again resolve directory symlinks since the target of the just found
26375        # link could be in a different directory
26376        cd `$DIRNAME $ISLINK`
26377        sym_link_dir=`$THEPWDCMD -P`
26378        sym_link_file=`$BASENAME $ISLINK`
26379        let COUNTER=COUNTER+1
26380      done
26381      cd $STARTDIR
26382      BINARY=$sym_link_dir/$sym_link_file
26383    fi
26384  fi
26385
26386    BOOT_JDK=`dirname "$BINARY"`
26387    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26388    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26389      # Looks like we found ourselves an JDK
26390      BOOT_JDK_FOUND=maybe
26391      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26392$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26393    fi
26394  fi
26395
26396
26397    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26398    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26399      # Do we have a bin/java?
26400      if test ! -x "$BOOT_JDK/bin/java"; then
26401        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26403        BOOT_JDK_FOUND=no
26404      else
26405        # Do we have a bin/javac?
26406        if test ! -x "$BOOT_JDK/bin/javac"; then
26407          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26409          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26410$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26411          BOOT_JDK_FOUND=no
26412        else
26413          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26414          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26415
26416          # Extra M4 quote needed to protect [] in grep expression.
26417          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26418          if test "x$FOUND_CORRECT_VERSION" = x; then
26419            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26420$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26421            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26422$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26423            BOOT_JDK_FOUND=no
26424          else
26425            # We're done! :-)
26426            BOOT_JDK_FOUND=yes
26427
26428  # Only process if variable expands to non-empty
26429
26430  if test "x$BOOT_JDK" != x; then
26431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26432
26433  # Input might be given as Windows format, start by converting to
26434  # unix format.
26435  path="$BOOT_JDK"
26436  new_path=`$CYGPATH -u "$path"`
26437
26438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26441  # "foo.exe" is OK but "foo" is an error.
26442  #
26443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26444  # It is also a way to make sure we got the proper file name for the real test later on.
26445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26446  if test "x$test_shortpath" = x; then
26447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26450  fi
26451
26452  # Call helper function which possibly converts this using DOS-style short mode.
26453  # If so, the updated path is stored in $new_path.
26454
26455  input_path="$new_path"
26456  # Check if we need to convert this using DOS-style short mode. If the path
26457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26458  # take no chances and rewrite it.
26459  # Note: m4 eats our [], so we need to use [ and ] instead.
26460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26461  if test "x$has_forbidden_chars" != x; then
26462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26466      # Going to short mode and back again did indeed matter. Since short mode is
26467      # case insensitive, let's make it lowercase to improve readability.
26468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26469      # Now convert it back to Unix-style (cygpath)
26470      input_path=`$CYGPATH -u "$shortmode_path"`
26471      new_path="$input_path"
26472    fi
26473  fi
26474
26475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26476  if test "x$test_cygdrive_prefix" = x; then
26477    # As a simple fix, exclude /usr/bin since it's not a real path.
26478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26480      # a path prefixed by /cygdrive for fixpath to work.
26481      new_path="$CYGWIN_ROOT_PATH$input_path"
26482    fi
26483  fi
26484
26485
26486  if test "x$path" != "x$new_path"; then
26487    BOOT_JDK="$new_path"
26488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26490  fi
26491
26492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26493
26494  path="$BOOT_JDK"
26495  has_colon=`$ECHO $path | $GREP ^.:`
26496  new_path="$path"
26497  if test "x$has_colon" = x; then
26498    # Not in mixed or Windows style, start by that.
26499    new_path=`cmd //c echo $path`
26500  fi
26501
26502
26503  input_path="$new_path"
26504  # Check if we need to convert this using DOS-style short mode. If the path
26505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26506  # take no chances and rewrite it.
26507  # Note: m4 eats our [], so we need to use [ and ] instead.
26508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26509  if test "x$has_forbidden_chars" != x; then
26510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26512  fi
26513
26514
26515  windows_path="$new_path"
26516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26517    unix_path=`$CYGPATH -u "$windows_path"`
26518    new_path="$unix_path"
26519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26521    new_path="$unix_path"
26522  fi
26523
26524  if test "x$path" != "x$new_path"; then
26525    BOOT_JDK="$new_path"
26526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26528  fi
26529
26530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26532
26533    else
26534      # We're on a unix platform. Hooray! :)
26535      path="$BOOT_JDK"
26536      has_space=`$ECHO "$path" | $GREP " "`
26537      if test "x$has_space" != x; then
26538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26541      fi
26542
26543      # Use eval to expand a potential ~
26544      eval path="$path"
26545      if test ! -f "$path" && test ! -d "$path"; then
26546        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26547      fi
26548
26549      if test -d "$path"; then
26550        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26551      else
26552        dir="`$DIRNAME "$path"`"
26553        base="`$BASENAME "$path"`"
26554        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26555      fi
26556    fi
26557  fi
26558
26559            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26560$as_echo_n "checking for Boot JDK... " >&6; }
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26562$as_echo "$BOOT_JDK" >&6; }
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26564$as_echo_n "checking Boot JDK version... " >&6; }
26565            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26567$as_echo "$BOOT_JDK_VERSION" >&6; }
26568          fi # end check jdk version
26569        fi # end check javac
26570      fi # end check java
26571    fi # end check boot jdk found
26572  fi
26573
26574
26575  # Test: Is there a JDK installed in default, well-known locations?
26576
26577  if test "x$BOOT_JDK_FOUND" = xno; then
26578    # Now execute the test
26579
26580  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26581
26582  if test "x$BOOT_JDK_FOUND" = xno; then
26583    # Now execute the test
26584
26585  if test "x$ProgramW6432" != x; then
26586    VIRTUAL_DIR="$ProgramW6432/Java"
26587
26588  windows_path="$VIRTUAL_DIR"
26589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26590    unix_path=`$CYGPATH -u "$windows_path"`
26591    VIRTUAL_DIR="$unix_path"
26592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26594    VIRTUAL_DIR="$unix_path"
26595  fi
26596
26597
26598  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26599  BOOT_JDK_SUFFIX=""
26600  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26601  if test "x$ALL_JDKS_FOUND" != x; then
26602    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26603
26604  if test "x$BOOT_JDK_FOUND" = xno; then
26605    # Now execute the test
26606
26607        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26608        if test -d "$BOOT_JDK"; then
26609          BOOT_JDK_FOUND=maybe
26610          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26611$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26612        fi
26613
26614
26615    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26616    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26617      # Do we have a bin/java?
26618      if test ! -x "$BOOT_JDK/bin/java"; then
26619        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26621        BOOT_JDK_FOUND=no
26622      else
26623        # Do we have a bin/javac?
26624        if test ! -x "$BOOT_JDK/bin/javac"; then
26625          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26627          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26628$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26629          BOOT_JDK_FOUND=no
26630        else
26631          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26632          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26633
26634          # Extra M4 quote needed to protect [] in grep expression.
26635          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26636          if test "x$FOUND_CORRECT_VERSION" = x; then
26637            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26638$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26640$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26641            BOOT_JDK_FOUND=no
26642          else
26643            # We're done! :-)
26644            BOOT_JDK_FOUND=yes
26645
26646  # Only process if variable expands to non-empty
26647
26648  if test "x$BOOT_JDK" != x; then
26649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26650
26651  # Input might be given as Windows format, start by converting to
26652  # unix format.
26653  path="$BOOT_JDK"
26654  new_path=`$CYGPATH -u "$path"`
26655
26656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26659  # "foo.exe" is OK but "foo" is an error.
26660  #
26661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26662  # It is also a way to make sure we got the proper file name for the real test later on.
26663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26664  if test "x$test_shortpath" = x; then
26665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26668  fi
26669
26670  # Call helper function which possibly converts this using DOS-style short mode.
26671  # If so, the updated path is stored in $new_path.
26672
26673  input_path="$new_path"
26674  # Check if we need to convert this using DOS-style short mode. If the path
26675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26676  # take no chances and rewrite it.
26677  # Note: m4 eats our [], so we need to use [ and ] instead.
26678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26679  if test "x$has_forbidden_chars" != x; then
26680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26684      # Going to short mode and back again did indeed matter. Since short mode is
26685      # case insensitive, let's make it lowercase to improve readability.
26686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26687      # Now convert it back to Unix-style (cygpath)
26688      input_path=`$CYGPATH -u "$shortmode_path"`
26689      new_path="$input_path"
26690    fi
26691  fi
26692
26693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26694  if test "x$test_cygdrive_prefix" = x; then
26695    # As a simple fix, exclude /usr/bin since it's not a real path.
26696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26698      # a path prefixed by /cygdrive for fixpath to work.
26699      new_path="$CYGWIN_ROOT_PATH$input_path"
26700    fi
26701  fi
26702
26703
26704  if test "x$path" != "x$new_path"; then
26705    BOOT_JDK="$new_path"
26706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26708  fi
26709
26710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26711
26712  path="$BOOT_JDK"
26713  has_colon=`$ECHO $path | $GREP ^.:`
26714  new_path="$path"
26715  if test "x$has_colon" = x; then
26716    # Not in mixed or Windows style, start by that.
26717    new_path=`cmd //c echo $path`
26718  fi
26719
26720
26721  input_path="$new_path"
26722  # Check if we need to convert this using DOS-style short mode. If the path
26723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26724  # take no chances and rewrite it.
26725  # Note: m4 eats our [], so we need to use [ and ] instead.
26726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26727  if test "x$has_forbidden_chars" != x; then
26728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26730  fi
26731
26732
26733  windows_path="$new_path"
26734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26735    unix_path=`$CYGPATH -u "$windows_path"`
26736    new_path="$unix_path"
26737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26739    new_path="$unix_path"
26740  fi
26741
26742  if test "x$path" != "x$new_path"; then
26743    BOOT_JDK="$new_path"
26744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26746  fi
26747
26748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26750
26751    else
26752      # We're on a unix platform. Hooray! :)
26753      path="$BOOT_JDK"
26754      has_space=`$ECHO "$path" | $GREP " "`
26755      if test "x$has_space" != x; then
26756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26759      fi
26760
26761      # Use eval to expand a potential ~
26762      eval path="$path"
26763      if test ! -f "$path" && test ! -d "$path"; then
26764        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26765      fi
26766
26767      if test -d "$path"; then
26768        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26769      else
26770        dir="`$DIRNAME "$path"`"
26771        base="`$BASENAME "$path"`"
26772        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26773      fi
26774    fi
26775  fi
26776
26777            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26778$as_echo_n "checking for Boot JDK... " >&6; }
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26780$as_echo "$BOOT_JDK" >&6; }
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26782$as_echo_n "checking Boot JDK version... " >&6; }
26783            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26785$as_echo "$BOOT_JDK_VERSION" >&6; }
26786          fi # end check jdk version
26787        fi # end check javac
26788      fi # end check java
26789    fi # end check boot jdk found
26790  fi
26791
26792    done
26793  fi
26794
26795  fi
26796
26797
26798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26800      # Do we have a bin/java?
26801      if test ! -x "$BOOT_JDK/bin/java"; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26804        BOOT_JDK_FOUND=no
26805      else
26806        # Do we have a bin/javac?
26807        if test ! -x "$BOOT_JDK/bin/javac"; then
26808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26812          BOOT_JDK_FOUND=no
26813        else
26814          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26815          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26816
26817          # Extra M4 quote needed to protect [] in grep expression.
26818          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26819          if test "x$FOUND_CORRECT_VERSION" = x; then
26820            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26823$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26824            BOOT_JDK_FOUND=no
26825          else
26826            # We're done! :-)
26827            BOOT_JDK_FOUND=yes
26828
26829  # Only process if variable expands to non-empty
26830
26831  if test "x$BOOT_JDK" != x; then
26832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26833
26834  # Input might be given as Windows format, start by converting to
26835  # unix format.
26836  path="$BOOT_JDK"
26837  new_path=`$CYGPATH -u "$path"`
26838
26839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26842  # "foo.exe" is OK but "foo" is an error.
26843  #
26844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26845  # It is also a way to make sure we got the proper file name for the real test later on.
26846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26847  if test "x$test_shortpath" = x; then
26848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26850    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26851  fi
26852
26853  # Call helper function which possibly converts this using DOS-style short mode.
26854  # If so, the updated path is stored in $new_path.
26855
26856  input_path="$new_path"
26857  # Check if we need to convert this using DOS-style short mode. If the path
26858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26859  # take no chances and rewrite it.
26860  # Note: m4 eats our [], so we need to use [ and ] instead.
26861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26862  if test "x$has_forbidden_chars" != x; then
26863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26867      # Going to short mode and back again did indeed matter. Since short mode is
26868      # case insensitive, let's make it lowercase to improve readability.
26869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26870      # Now convert it back to Unix-style (cygpath)
26871      input_path=`$CYGPATH -u "$shortmode_path"`
26872      new_path="$input_path"
26873    fi
26874  fi
26875
26876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26877  if test "x$test_cygdrive_prefix" = x; then
26878    # As a simple fix, exclude /usr/bin since it's not a real path.
26879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26881      # a path prefixed by /cygdrive for fixpath to work.
26882      new_path="$CYGWIN_ROOT_PATH$input_path"
26883    fi
26884  fi
26885
26886
26887  if test "x$path" != "x$new_path"; then
26888    BOOT_JDK="$new_path"
26889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26890$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26891  fi
26892
26893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26894
26895  path="$BOOT_JDK"
26896  has_colon=`$ECHO $path | $GREP ^.:`
26897  new_path="$path"
26898  if test "x$has_colon" = x; then
26899    # Not in mixed or Windows style, start by that.
26900    new_path=`cmd //c echo $path`
26901  fi
26902
26903
26904  input_path="$new_path"
26905  # Check if we need to convert this using DOS-style short mode. If the path
26906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26907  # take no chances and rewrite it.
26908  # Note: m4 eats our [], so we need to use [ and ] instead.
26909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26910  if test "x$has_forbidden_chars" != x; then
26911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26913  fi
26914
26915
26916  windows_path="$new_path"
26917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26918    unix_path=`$CYGPATH -u "$windows_path"`
26919    new_path="$unix_path"
26920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26922    new_path="$unix_path"
26923  fi
26924
26925  if test "x$path" != "x$new_path"; then
26926    BOOT_JDK="$new_path"
26927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26928$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26929  fi
26930
26931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26933
26934    else
26935      # We're on a unix platform. Hooray! :)
26936      path="$BOOT_JDK"
26937      has_space=`$ECHO "$path" | $GREP " "`
26938      if test "x$has_space" != x; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26942      fi
26943
26944      # Use eval to expand a potential ~
26945      eval path="$path"
26946      if test ! -f "$path" && test ! -d "$path"; then
26947        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26948      fi
26949
26950      if test -d "$path"; then
26951        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26952      else
26953        dir="`$DIRNAME "$path"`"
26954        base="`$BASENAME "$path"`"
26955        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26956      fi
26957    fi
26958  fi
26959
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26961$as_echo_n "checking for Boot JDK... " >&6; }
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26963$as_echo "$BOOT_JDK" >&6; }
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26965$as_echo_n "checking Boot JDK version... " >&6; }
26966            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26968$as_echo "$BOOT_JDK_VERSION" >&6; }
26969          fi # end check jdk version
26970        fi # end check javac
26971      fi # end check java
26972    fi # end check boot jdk found
26973  fi
26974
26975
26976  if test "x$BOOT_JDK_FOUND" = xno; then
26977    # Now execute the test
26978
26979  if test "x$PROGRAMW6432" != x; then
26980    VIRTUAL_DIR="$PROGRAMW6432/Java"
26981
26982  windows_path="$VIRTUAL_DIR"
26983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26984    unix_path=`$CYGPATH -u "$windows_path"`
26985    VIRTUAL_DIR="$unix_path"
26986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26988    VIRTUAL_DIR="$unix_path"
26989  fi
26990
26991
26992  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26993  BOOT_JDK_SUFFIX=""
26994  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26995  if test "x$ALL_JDKS_FOUND" != x; then
26996    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26997
26998  if test "x$BOOT_JDK_FOUND" = xno; then
26999    # Now execute the test
27000
27001        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27002        if test -d "$BOOT_JDK"; then
27003          BOOT_JDK_FOUND=maybe
27004          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27005$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27006        fi
27007
27008
27009    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27010    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27011      # Do we have a bin/java?
27012      if test ! -x "$BOOT_JDK/bin/java"; then
27013        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27015        BOOT_JDK_FOUND=no
27016      else
27017        # Do we have a bin/javac?
27018        if test ! -x "$BOOT_JDK/bin/javac"; then
27019          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27021          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27022$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27023          BOOT_JDK_FOUND=no
27024        else
27025          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27026          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27027
27028          # Extra M4 quote needed to protect [] in grep expression.
27029          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27030          if test "x$FOUND_CORRECT_VERSION" = x; then
27031            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27034$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27035            BOOT_JDK_FOUND=no
27036          else
27037            # We're done! :-)
27038            BOOT_JDK_FOUND=yes
27039
27040  # Only process if variable expands to non-empty
27041
27042  if test "x$BOOT_JDK" != x; then
27043    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27044
27045  # Input might be given as Windows format, start by converting to
27046  # unix format.
27047  path="$BOOT_JDK"
27048  new_path=`$CYGPATH -u "$path"`
27049
27050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27053  # "foo.exe" is OK but "foo" is an error.
27054  #
27055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27056  # It is also a way to make sure we got the proper file name for the real test later on.
27057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27058  if test "x$test_shortpath" = x; then
27059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27062  fi
27063
27064  # Call helper function which possibly converts this using DOS-style short mode.
27065  # If so, the updated path is stored in $new_path.
27066
27067  input_path="$new_path"
27068  # Check if we need to convert this using DOS-style short mode. If the path
27069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27070  # take no chances and rewrite it.
27071  # Note: m4 eats our [], so we need to use [ and ] instead.
27072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27073  if test "x$has_forbidden_chars" != x; then
27074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27078      # Going to short mode and back again did indeed matter. Since short mode is
27079      # case insensitive, let's make it lowercase to improve readability.
27080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27081      # Now convert it back to Unix-style (cygpath)
27082      input_path=`$CYGPATH -u "$shortmode_path"`
27083      new_path="$input_path"
27084    fi
27085  fi
27086
27087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27088  if test "x$test_cygdrive_prefix" = x; then
27089    # As a simple fix, exclude /usr/bin since it's not a real path.
27090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27092      # a path prefixed by /cygdrive for fixpath to work.
27093      new_path="$CYGWIN_ROOT_PATH$input_path"
27094    fi
27095  fi
27096
27097
27098  if test "x$path" != "x$new_path"; then
27099    BOOT_JDK="$new_path"
27100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27102  fi
27103
27104    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27105
27106  path="$BOOT_JDK"
27107  has_colon=`$ECHO $path | $GREP ^.:`
27108  new_path="$path"
27109  if test "x$has_colon" = x; then
27110    # Not in mixed or Windows style, start by that.
27111    new_path=`cmd //c echo $path`
27112  fi
27113
27114
27115  input_path="$new_path"
27116  # Check if we need to convert this using DOS-style short mode. If the path
27117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27118  # take no chances and rewrite it.
27119  # Note: m4 eats our [], so we need to use [ and ] instead.
27120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27121  if test "x$has_forbidden_chars" != x; then
27122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27124  fi
27125
27126
27127  windows_path="$new_path"
27128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27129    unix_path=`$CYGPATH -u "$windows_path"`
27130    new_path="$unix_path"
27131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27133    new_path="$unix_path"
27134  fi
27135
27136  if test "x$path" != "x$new_path"; then
27137    BOOT_JDK="$new_path"
27138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27140  fi
27141
27142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27144
27145    else
27146      # We're on a unix platform. Hooray! :)
27147      path="$BOOT_JDK"
27148      has_space=`$ECHO "$path" | $GREP " "`
27149      if test "x$has_space" != x; then
27150        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27152        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27153      fi
27154
27155      # Use eval to expand a potential ~
27156      eval path="$path"
27157      if test ! -f "$path" && test ! -d "$path"; then
27158        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27159      fi
27160
27161      if test -d "$path"; then
27162        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27163      else
27164        dir="`$DIRNAME "$path"`"
27165        base="`$BASENAME "$path"`"
27166        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27167      fi
27168    fi
27169  fi
27170
27171            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27172$as_echo_n "checking for Boot JDK... " >&6; }
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27174$as_echo "$BOOT_JDK" >&6; }
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27176$as_echo_n "checking Boot JDK version... " >&6; }
27177            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27179$as_echo "$BOOT_JDK_VERSION" >&6; }
27180          fi # end check jdk version
27181        fi # end check javac
27182      fi # end check java
27183    fi # end check boot jdk found
27184  fi
27185
27186    done
27187  fi
27188
27189  fi
27190
27191
27192    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27193    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27194      # Do we have a bin/java?
27195      if test ! -x "$BOOT_JDK/bin/java"; then
27196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27197$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27198        BOOT_JDK_FOUND=no
27199      else
27200        # Do we have a bin/javac?
27201        if test ! -x "$BOOT_JDK/bin/javac"; then
27202          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27204          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27205$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27206          BOOT_JDK_FOUND=no
27207        else
27208          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27209          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27210
27211          # Extra M4 quote needed to protect [] in grep expression.
27212          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27213          if test "x$FOUND_CORRECT_VERSION" = x; then
27214            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27216            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27217$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27218            BOOT_JDK_FOUND=no
27219          else
27220            # We're done! :-)
27221            BOOT_JDK_FOUND=yes
27222
27223  # Only process if variable expands to non-empty
27224
27225  if test "x$BOOT_JDK" != x; then
27226    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27227
27228  # Input might be given as Windows format, start by converting to
27229  # unix format.
27230  path="$BOOT_JDK"
27231  new_path=`$CYGPATH -u "$path"`
27232
27233  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27234  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27235  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27236  # "foo.exe" is OK but "foo" is an error.
27237  #
27238  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27239  # It is also a way to make sure we got the proper file name for the real test later on.
27240  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27241  if test "x$test_shortpath" = x; then
27242    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27243$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27244    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27245  fi
27246
27247  # Call helper function which possibly converts this using DOS-style short mode.
27248  # If so, the updated path is stored in $new_path.
27249
27250  input_path="$new_path"
27251  # Check if we need to convert this using DOS-style short mode. If the path
27252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27253  # take no chances and rewrite it.
27254  # Note: m4 eats our [], so we need to use [ and ] instead.
27255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27256  if test "x$has_forbidden_chars" != x; then
27257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27261      # Going to short mode and back again did indeed matter. Since short mode is
27262      # case insensitive, let's make it lowercase to improve readability.
27263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27264      # Now convert it back to Unix-style (cygpath)
27265      input_path=`$CYGPATH -u "$shortmode_path"`
27266      new_path="$input_path"
27267    fi
27268  fi
27269
27270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27271  if test "x$test_cygdrive_prefix" = x; then
27272    # As a simple fix, exclude /usr/bin since it's not a real path.
27273    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27275      # a path prefixed by /cygdrive for fixpath to work.
27276      new_path="$CYGWIN_ROOT_PATH$input_path"
27277    fi
27278  fi
27279
27280
27281  if test "x$path" != "x$new_path"; then
27282    BOOT_JDK="$new_path"
27283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27284$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27285  fi
27286
27287    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27288
27289  path="$BOOT_JDK"
27290  has_colon=`$ECHO $path | $GREP ^.:`
27291  new_path="$path"
27292  if test "x$has_colon" = x; then
27293    # Not in mixed or Windows style, start by that.
27294    new_path=`cmd //c echo $path`
27295  fi
27296
27297
27298  input_path="$new_path"
27299  # Check if we need to convert this using DOS-style short mode. If the path
27300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27301  # take no chances and rewrite it.
27302  # Note: m4 eats our [], so we need to use [ and ] instead.
27303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27304  if test "x$has_forbidden_chars" != x; then
27305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27306    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27307  fi
27308
27309
27310  windows_path="$new_path"
27311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27312    unix_path=`$CYGPATH -u "$windows_path"`
27313    new_path="$unix_path"
27314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27316    new_path="$unix_path"
27317  fi
27318
27319  if test "x$path" != "x$new_path"; then
27320    BOOT_JDK="$new_path"
27321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27323  fi
27324
27325  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27326  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27327
27328    else
27329      # We're on a unix platform. Hooray! :)
27330      path="$BOOT_JDK"
27331      has_space=`$ECHO "$path" | $GREP " "`
27332      if test "x$has_space" != x; then
27333        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27335        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27336      fi
27337
27338      # Use eval to expand a potential ~
27339      eval path="$path"
27340      if test ! -f "$path" && test ! -d "$path"; then
27341        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27342      fi
27343
27344      if test -d "$path"; then
27345        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27346      else
27347        dir="`$DIRNAME "$path"`"
27348        base="`$BASENAME "$path"`"
27349        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27350      fi
27351    fi
27352  fi
27353
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27355$as_echo_n "checking for Boot JDK... " >&6; }
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27357$as_echo "$BOOT_JDK" >&6; }
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27359$as_echo_n "checking Boot JDK version... " >&6; }
27360            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27361            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27362$as_echo "$BOOT_JDK_VERSION" >&6; }
27363          fi # end check jdk version
27364        fi # end check javac
27365      fi # end check java
27366    fi # end check boot jdk found
27367  fi
27368
27369
27370  if test "x$BOOT_JDK_FOUND" = xno; then
27371    # Now execute the test
27372
27373  if test "x$PROGRAMFILES" != x; then
27374    VIRTUAL_DIR="$PROGRAMFILES/Java"
27375
27376  windows_path="$VIRTUAL_DIR"
27377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27378    unix_path=`$CYGPATH -u "$windows_path"`
27379    VIRTUAL_DIR="$unix_path"
27380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27382    VIRTUAL_DIR="$unix_path"
27383  fi
27384
27385
27386  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27387  BOOT_JDK_SUFFIX=""
27388  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27389  if test "x$ALL_JDKS_FOUND" != x; then
27390    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27391
27392  if test "x$BOOT_JDK_FOUND" = xno; then
27393    # Now execute the test
27394
27395        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27396        if test -d "$BOOT_JDK"; then
27397          BOOT_JDK_FOUND=maybe
27398          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27399$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27400        fi
27401
27402
27403    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27404    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27405      # Do we have a bin/java?
27406      if test ! -x "$BOOT_JDK/bin/java"; then
27407        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27409        BOOT_JDK_FOUND=no
27410      else
27411        # Do we have a bin/javac?
27412        if test ! -x "$BOOT_JDK/bin/javac"; then
27413          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27415          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27416$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27417          BOOT_JDK_FOUND=no
27418        else
27419          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27420          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27421
27422          # Extra M4 quote needed to protect [] in grep expression.
27423          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27424          if test "x$FOUND_CORRECT_VERSION" = x; then
27425            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27428$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27429            BOOT_JDK_FOUND=no
27430          else
27431            # We're done! :-)
27432            BOOT_JDK_FOUND=yes
27433
27434  # Only process if variable expands to non-empty
27435
27436  if test "x$BOOT_JDK" != x; then
27437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27438
27439  # Input might be given as Windows format, start by converting to
27440  # unix format.
27441  path="$BOOT_JDK"
27442  new_path=`$CYGPATH -u "$path"`
27443
27444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27447  # "foo.exe" is OK but "foo" is an error.
27448  #
27449  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27450  # It is also a way to make sure we got the proper file name for the real test later on.
27451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27452  if test "x$test_shortpath" = x; then
27453    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27455    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27456  fi
27457
27458  # Call helper function which possibly converts this using DOS-style short mode.
27459  # If so, the updated path is stored in $new_path.
27460
27461  input_path="$new_path"
27462  # Check if we need to convert this using DOS-style short mode. If the path
27463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27464  # take no chances and rewrite it.
27465  # Note: m4 eats our [], so we need to use [ and ] instead.
27466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27467  if test "x$has_forbidden_chars" != x; then
27468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27469    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27470    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27471    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27472      # Going to short mode and back again did indeed matter. Since short mode is
27473      # case insensitive, let's make it lowercase to improve readability.
27474      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27475      # Now convert it back to Unix-style (cygpath)
27476      input_path=`$CYGPATH -u "$shortmode_path"`
27477      new_path="$input_path"
27478    fi
27479  fi
27480
27481  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27482  if test "x$test_cygdrive_prefix" = x; then
27483    # As a simple fix, exclude /usr/bin since it's not a real path.
27484    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27485      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27486      # a path prefixed by /cygdrive for fixpath to work.
27487      new_path="$CYGWIN_ROOT_PATH$input_path"
27488    fi
27489  fi
27490
27491
27492  if test "x$path" != "x$new_path"; then
27493    BOOT_JDK="$new_path"
27494    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27495$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27496  fi
27497
27498    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27499
27500  path="$BOOT_JDK"
27501  has_colon=`$ECHO $path | $GREP ^.:`
27502  new_path="$path"
27503  if test "x$has_colon" = x; then
27504    # Not in mixed or Windows style, start by that.
27505    new_path=`cmd //c echo $path`
27506  fi
27507
27508
27509  input_path="$new_path"
27510  # Check if we need to convert this using DOS-style short mode. If the path
27511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27512  # take no chances and rewrite it.
27513  # Note: m4 eats our [], so we need to use [ and ] instead.
27514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27515  if test "x$has_forbidden_chars" != x; then
27516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27518  fi
27519
27520
27521  windows_path="$new_path"
27522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27523    unix_path=`$CYGPATH -u "$windows_path"`
27524    new_path="$unix_path"
27525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27527    new_path="$unix_path"
27528  fi
27529
27530  if test "x$path" != "x$new_path"; then
27531    BOOT_JDK="$new_path"
27532    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27533$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27534  fi
27535
27536  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27537  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27538
27539    else
27540      # We're on a unix platform. Hooray! :)
27541      path="$BOOT_JDK"
27542      has_space=`$ECHO "$path" | $GREP " "`
27543      if test "x$has_space" != x; then
27544        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27545$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27546        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27547      fi
27548
27549      # Use eval to expand a potential ~
27550      eval path="$path"
27551      if test ! -f "$path" && test ! -d "$path"; then
27552        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27553      fi
27554
27555      if test -d "$path"; then
27556        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27557      else
27558        dir="`$DIRNAME "$path"`"
27559        base="`$BASENAME "$path"`"
27560        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27561      fi
27562    fi
27563  fi
27564
27565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27566$as_echo_n "checking for Boot JDK... " >&6; }
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27568$as_echo "$BOOT_JDK" >&6; }
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27570$as_echo_n "checking Boot JDK version... " >&6; }
27571            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27572            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27573$as_echo "$BOOT_JDK_VERSION" >&6; }
27574          fi # end check jdk version
27575        fi # end check javac
27576      fi # end check java
27577    fi # end check boot jdk found
27578  fi
27579
27580    done
27581  fi
27582
27583  fi
27584
27585
27586    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27587    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27588      # Do we have a bin/java?
27589      if test ! -x "$BOOT_JDK/bin/java"; then
27590        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27591$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27592        BOOT_JDK_FOUND=no
27593      else
27594        # Do we have a bin/javac?
27595        if test ! -x "$BOOT_JDK/bin/javac"; then
27596          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27598          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27599$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27600          BOOT_JDK_FOUND=no
27601        else
27602          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27603          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27604
27605          # Extra M4 quote needed to protect [] in grep expression.
27606          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27607          if test "x$FOUND_CORRECT_VERSION" = x; then
27608            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27611$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27612            BOOT_JDK_FOUND=no
27613          else
27614            # We're done! :-)
27615            BOOT_JDK_FOUND=yes
27616
27617  # Only process if variable expands to non-empty
27618
27619  if test "x$BOOT_JDK" != x; then
27620    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27621
27622  # Input might be given as Windows format, start by converting to
27623  # unix format.
27624  path="$BOOT_JDK"
27625  new_path=`$CYGPATH -u "$path"`
27626
27627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27630  # "foo.exe" is OK but "foo" is an error.
27631  #
27632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27633  # It is also a way to make sure we got the proper file name for the real test later on.
27634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27635  if test "x$test_shortpath" = x; then
27636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27639  fi
27640
27641  # Call helper function which possibly converts this using DOS-style short mode.
27642  # If so, the updated path is stored in $new_path.
27643
27644  input_path="$new_path"
27645  # Check if we need to convert this using DOS-style short mode. If the path
27646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27647  # take no chances and rewrite it.
27648  # Note: m4 eats our [], so we need to use [ and ] instead.
27649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27650  if test "x$has_forbidden_chars" != x; then
27651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27655      # Going to short mode and back again did indeed matter. Since short mode is
27656      # case insensitive, let's make it lowercase to improve readability.
27657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27658      # Now convert it back to Unix-style (cygpath)
27659      input_path=`$CYGPATH -u "$shortmode_path"`
27660      new_path="$input_path"
27661    fi
27662  fi
27663
27664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27665  if test "x$test_cygdrive_prefix" = x; then
27666    # As a simple fix, exclude /usr/bin since it's not a real path.
27667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27669      # a path prefixed by /cygdrive for fixpath to work.
27670      new_path="$CYGWIN_ROOT_PATH$input_path"
27671    fi
27672  fi
27673
27674
27675  if test "x$path" != "x$new_path"; then
27676    BOOT_JDK="$new_path"
27677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27679  fi
27680
27681    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27682
27683  path="$BOOT_JDK"
27684  has_colon=`$ECHO $path | $GREP ^.:`
27685  new_path="$path"
27686  if test "x$has_colon" = x; then
27687    # Not in mixed or Windows style, start by that.
27688    new_path=`cmd //c echo $path`
27689  fi
27690
27691
27692  input_path="$new_path"
27693  # Check if we need to convert this using DOS-style short mode. If the path
27694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27695  # take no chances and rewrite it.
27696  # Note: m4 eats our [], so we need to use [ and ] instead.
27697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27698  if test "x$has_forbidden_chars" != x; then
27699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27701  fi
27702
27703
27704  windows_path="$new_path"
27705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27706    unix_path=`$CYGPATH -u "$windows_path"`
27707    new_path="$unix_path"
27708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27710    new_path="$unix_path"
27711  fi
27712
27713  if test "x$path" != "x$new_path"; then
27714    BOOT_JDK="$new_path"
27715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27717  fi
27718
27719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27721
27722    else
27723      # We're on a unix platform. Hooray! :)
27724      path="$BOOT_JDK"
27725      has_space=`$ECHO "$path" | $GREP " "`
27726      if test "x$has_space" != x; then
27727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27729        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27730      fi
27731
27732      # Use eval to expand a potential ~
27733      eval path="$path"
27734      if test ! -f "$path" && test ! -d "$path"; then
27735        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27736      fi
27737
27738      if test -d "$path"; then
27739        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27740      else
27741        dir="`$DIRNAME "$path"`"
27742        base="`$BASENAME "$path"`"
27743        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27744      fi
27745    fi
27746  fi
27747
27748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27749$as_echo_n "checking for Boot JDK... " >&6; }
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27751$as_echo "$BOOT_JDK" >&6; }
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27753$as_echo_n "checking Boot JDK version... " >&6; }
27754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27756$as_echo "$BOOT_JDK_VERSION" >&6; }
27757          fi # end check jdk version
27758        fi # end check javac
27759      fi # end check java
27760    fi # end check boot jdk found
27761  fi
27762
27763
27764  if test "x$BOOT_JDK_FOUND" = xno; then
27765    # Now execute the test
27766
27767  if test "x$ProgramFiles" != x; then
27768    VIRTUAL_DIR="$ProgramFiles/Java"
27769
27770  windows_path="$VIRTUAL_DIR"
27771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27772    unix_path=`$CYGPATH -u "$windows_path"`
27773    VIRTUAL_DIR="$unix_path"
27774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27776    VIRTUAL_DIR="$unix_path"
27777  fi
27778
27779
27780  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27781  BOOT_JDK_SUFFIX=""
27782  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27783  if test "x$ALL_JDKS_FOUND" != x; then
27784    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27785
27786  if test "x$BOOT_JDK_FOUND" = xno; then
27787    # Now execute the test
27788
27789        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27790        if test -d "$BOOT_JDK"; then
27791          BOOT_JDK_FOUND=maybe
27792          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27793$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27794        fi
27795
27796
27797    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27798    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27799      # Do we have a bin/java?
27800      if test ! -x "$BOOT_JDK/bin/java"; then
27801        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27802$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27803        BOOT_JDK_FOUND=no
27804      else
27805        # Do we have a bin/javac?
27806        if test ! -x "$BOOT_JDK/bin/javac"; then
27807          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27808$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27809          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27810$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27811          BOOT_JDK_FOUND=no
27812        else
27813          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27814          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27815
27816          # Extra M4 quote needed to protect [] in grep expression.
27817          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27818          if test "x$FOUND_CORRECT_VERSION" = x; then
27819            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27822$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27823            BOOT_JDK_FOUND=no
27824          else
27825            # We're done! :-)
27826            BOOT_JDK_FOUND=yes
27827
27828  # Only process if variable expands to non-empty
27829
27830  if test "x$BOOT_JDK" != x; then
27831    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27832
27833  # Input might be given as Windows format, start by converting to
27834  # unix format.
27835  path="$BOOT_JDK"
27836  new_path=`$CYGPATH -u "$path"`
27837
27838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27841  # "foo.exe" is OK but "foo" is an error.
27842  #
27843  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27844  # It is also a way to make sure we got the proper file name for the real test later on.
27845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27846  if test "x$test_shortpath" = x; then
27847    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27849    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27850  fi
27851
27852  # Call helper function which possibly converts this using DOS-style short mode.
27853  # If so, the updated path is stored in $new_path.
27854
27855  input_path="$new_path"
27856  # Check if we need to convert this using DOS-style short mode. If the path
27857  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27858  # take no chances and rewrite it.
27859  # Note: m4 eats our [], so we need to use [ and ] instead.
27860  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27861  if test "x$has_forbidden_chars" != x; then
27862    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27863    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27864    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27865    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27866      # Going to short mode and back again did indeed matter. Since short mode is
27867      # case insensitive, let's make it lowercase to improve readability.
27868      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27869      # Now convert it back to Unix-style (cygpath)
27870      input_path=`$CYGPATH -u "$shortmode_path"`
27871      new_path="$input_path"
27872    fi
27873  fi
27874
27875  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27876  if test "x$test_cygdrive_prefix" = x; then
27877    # As a simple fix, exclude /usr/bin since it's not a real path.
27878    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27879      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27880      # a path prefixed by /cygdrive for fixpath to work.
27881      new_path="$CYGWIN_ROOT_PATH$input_path"
27882    fi
27883  fi
27884
27885
27886  if test "x$path" != "x$new_path"; then
27887    BOOT_JDK="$new_path"
27888    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27889$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27890  fi
27891
27892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27893
27894  path="$BOOT_JDK"
27895  has_colon=`$ECHO $path | $GREP ^.:`
27896  new_path="$path"
27897  if test "x$has_colon" = x; then
27898    # Not in mixed or Windows style, start by that.
27899    new_path=`cmd //c echo $path`
27900  fi
27901
27902
27903  input_path="$new_path"
27904  # Check if we need to convert this using DOS-style short mode. If the path
27905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27906  # take no chances and rewrite it.
27907  # Note: m4 eats our [], so we need to use [ and ] instead.
27908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27909  if test "x$has_forbidden_chars" != x; then
27910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27911    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27912  fi
27913
27914
27915  windows_path="$new_path"
27916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27917    unix_path=`$CYGPATH -u "$windows_path"`
27918    new_path="$unix_path"
27919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27921    new_path="$unix_path"
27922  fi
27923
27924  if test "x$path" != "x$new_path"; then
27925    BOOT_JDK="$new_path"
27926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27927$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27928  fi
27929
27930  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27931  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27932
27933    else
27934      # We're on a unix platform. Hooray! :)
27935      path="$BOOT_JDK"
27936      has_space=`$ECHO "$path" | $GREP " "`
27937      if test "x$has_space" != x; then
27938        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27940        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27941      fi
27942
27943      # Use eval to expand a potential ~
27944      eval path="$path"
27945      if test ! -f "$path" && test ! -d "$path"; then
27946        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27947      fi
27948
27949      if test -d "$path"; then
27950        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27951      else
27952        dir="`$DIRNAME "$path"`"
27953        base="`$BASENAME "$path"`"
27954        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27955      fi
27956    fi
27957  fi
27958
27959            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27960$as_echo_n "checking for Boot JDK... " >&6; }
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27962$as_echo "$BOOT_JDK" >&6; }
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27964$as_echo_n "checking Boot JDK version... " >&6; }
27965            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27967$as_echo "$BOOT_JDK_VERSION" >&6; }
27968          fi # end check jdk version
27969        fi # end check javac
27970      fi # end check java
27971    fi # end check boot jdk found
27972  fi
27973
27974    done
27975  fi
27976
27977  fi
27978
27979
27980    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27981    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27982      # Do we have a bin/java?
27983      if test ! -x "$BOOT_JDK/bin/java"; then
27984        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27986        BOOT_JDK_FOUND=no
27987      else
27988        # Do we have a bin/javac?
27989        if test ! -x "$BOOT_JDK/bin/javac"; then
27990          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27991$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27993$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27994          BOOT_JDK_FOUND=no
27995        else
27996          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27997          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27998
27999          # Extra M4 quote needed to protect [] in grep expression.
28000          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28001          if test "x$FOUND_CORRECT_VERSION" = x; then
28002            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28005$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28006            BOOT_JDK_FOUND=no
28007          else
28008            # We're done! :-)
28009            BOOT_JDK_FOUND=yes
28010
28011  # Only process if variable expands to non-empty
28012
28013  if test "x$BOOT_JDK" != x; then
28014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28015
28016  # Input might be given as Windows format, start by converting to
28017  # unix format.
28018  path="$BOOT_JDK"
28019  new_path=`$CYGPATH -u "$path"`
28020
28021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28024  # "foo.exe" is OK but "foo" is an error.
28025  #
28026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28027  # It is also a way to make sure we got the proper file name for the real test later on.
28028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28029  if test "x$test_shortpath" = x; then
28030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28032    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28033  fi
28034
28035  # Call helper function which possibly converts this using DOS-style short mode.
28036  # If so, the updated path is stored in $new_path.
28037
28038  input_path="$new_path"
28039  # Check if we need to convert this using DOS-style short mode. If the path
28040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28041  # take no chances and rewrite it.
28042  # Note: m4 eats our [], so we need to use [ and ] instead.
28043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28044  if test "x$has_forbidden_chars" != x; then
28045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28049      # Going to short mode and back again did indeed matter. Since short mode is
28050      # case insensitive, let's make it lowercase to improve readability.
28051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28052      # Now convert it back to Unix-style (cygpath)
28053      input_path=`$CYGPATH -u "$shortmode_path"`
28054      new_path="$input_path"
28055    fi
28056  fi
28057
28058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28059  if test "x$test_cygdrive_prefix" = x; then
28060    # As a simple fix, exclude /usr/bin since it's not a real path.
28061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28063      # a path prefixed by /cygdrive for fixpath to work.
28064      new_path="$CYGWIN_ROOT_PATH$input_path"
28065    fi
28066  fi
28067
28068
28069  if test "x$path" != "x$new_path"; then
28070    BOOT_JDK="$new_path"
28071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28072$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28073  fi
28074
28075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28076
28077  path="$BOOT_JDK"
28078  has_colon=`$ECHO $path | $GREP ^.:`
28079  new_path="$path"
28080  if test "x$has_colon" = x; then
28081    # Not in mixed or Windows style, start by that.
28082    new_path=`cmd //c echo $path`
28083  fi
28084
28085
28086  input_path="$new_path"
28087  # Check if we need to convert this using DOS-style short mode. If the path
28088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28089  # take no chances and rewrite it.
28090  # Note: m4 eats our [], so we need to use [ and ] instead.
28091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28092  if test "x$has_forbidden_chars" != x; then
28093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28095  fi
28096
28097
28098  windows_path="$new_path"
28099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28100    unix_path=`$CYGPATH -u "$windows_path"`
28101    new_path="$unix_path"
28102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28104    new_path="$unix_path"
28105  fi
28106
28107  if test "x$path" != "x$new_path"; then
28108    BOOT_JDK="$new_path"
28109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28110$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28111  fi
28112
28113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28115
28116    else
28117      # We're on a unix platform. Hooray! :)
28118      path="$BOOT_JDK"
28119      has_space=`$ECHO "$path" | $GREP " "`
28120      if test "x$has_space" != x; then
28121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28122$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28124      fi
28125
28126      # Use eval to expand a potential ~
28127      eval path="$path"
28128      if test ! -f "$path" && test ! -d "$path"; then
28129        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28130      fi
28131
28132      if test -d "$path"; then
28133        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28134      else
28135        dir="`$DIRNAME "$path"`"
28136        base="`$BASENAME "$path"`"
28137        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28138      fi
28139    fi
28140  fi
28141
28142            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28143$as_echo_n "checking for Boot JDK... " >&6; }
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28145$as_echo "$BOOT_JDK" >&6; }
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28147$as_echo_n "checking Boot JDK version... " >&6; }
28148            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28149            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28150$as_echo "$BOOT_JDK_VERSION" >&6; }
28151          fi # end check jdk version
28152        fi # end check javac
28153      fi # end check java
28154    fi # end check boot jdk found
28155  fi
28156
28157
28158  if test "x$BOOT_JDK_FOUND" = xno; then
28159    # Now execute the test
28160
28161  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28162  BOOT_JDK_SUFFIX=""
28163  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28164  if test "x$ALL_JDKS_FOUND" != x; then
28165    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28166
28167  if test "x$BOOT_JDK_FOUND" = xno; then
28168    # Now execute the test
28169
28170        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28171        if test -d "$BOOT_JDK"; then
28172          BOOT_JDK_FOUND=maybe
28173          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28174$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28175        fi
28176
28177
28178    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28179    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28180      # Do we have a bin/java?
28181      if test ! -x "$BOOT_JDK/bin/java"; then
28182        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28183$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28184        BOOT_JDK_FOUND=no
28185      else
28186        # Do we have a bin/javac?
28187        if test ! -x "$BOOT_JDK/bin/javac"; then
28188          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28190          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28191$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28192          BOOT_JDK_FOUND=no
28193        else
28194          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28195          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28196
28197          # Extra M4 quote needed to protect [] in grep expression.
28198          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28199          if test "x$FOUND_CORRECT_VERSION" = x; then
28200            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28201$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28203$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28204            BOOT_JDK_FOUND=no
28205          else
28206            # We're done! :-)
28207            BOOT_JDK_FOUND=yes
28208
28209  # Only process if variable expands to non-empty
28210
28211  if test "x$BOOT_JDK" != x; then
28212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213
28214  # Input might be given as Windows format, start by converting to
28215  # unix format.
28216  path="$BOOT_JDK"
28217  new_path=`$CYGPATH -u "$path"`
28218
28219  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28220  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28221  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28222  # "foo.exe" is OK but "foo" is an error.
28223  #
28224  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28225  # It is also a way to make sure we got the proper file name for the real test later on.
28226  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28227  if test "x$test_shortpath" = x; then
28228    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28230    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28231  fi
28232
28233  # Call helper function which possibly converts this using DOS-style short mode.
28234  # If so, the updated path is stored in $new_path.
28235
28236  input_path="$new_path"
28237  # Check if we need to convert this using DOS-style short mode. If the path
28238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28239  # take no chances and rewrite it.
28240  # Note: m4 eats our [], so we need to use [ and ] instead.
28241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28242  if test "x$has_forbidden_chars" != x; then
28243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28247      # Going to short mode and back again did indeed matter. Since short mode is
28248      # case insensitive, let's make it lowercase to improve readability.
28249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28250      # Now convert it back to Unix-style (cygpath)
28251      input_path=`$CYGPATH -u "$shortmode_path"`
28252      new_path="$input_path"
28253    fi
28254  fi
28255
28256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28257  if test "x$test_cygdrive_prefix" = x; then
28258    # As a simple fix, exclude /usr/bin since it's not a real path.
28259    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28261      # a path prefixed by /cygdrive for fixpath to work.
28262      new_path="$CYGWIN_ROOT_PATH$input_path"
28263    fi
28264  fi
28265
28266
28267  if test "x$path" != "x$new_path"; then
28268    BOOT_JDK="$new_path"
28269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28270$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28271  fi
28272
28273    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28274
28275  path="$BOOT_JDK"
28276  has_colon=`$ECHO $path | $GREP ^.:`
28277  new_path="$path"
28278  if test "x$has_colon" = x; then
28279    # Not in mixed or Windows style, start by that.
28280    new_path=`cmd //c echo $path`
28281  fi
28282
28283
28284  input_path="$new_path"
28285  # Check if we need to convert this using DOS-style short mode. If the path
28286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28287  # take no chances and rewrite it.
28288  # Note: m4 eats our [], so we need to use [ and ] instead.
28289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28290  if test "x$has_forbidden_chars" != x; then
28291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28292    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28293  fi
28294
28295
28296  windows_path="$new_path"
28297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28298    unix_path=`$CYGPATH -u "$windows_path"`
28299    new_path="$unix_path"
28300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28302    new_path="$unix_path"
28303  fi
28304
28305  if test "x$path" != "x$new_path"; then
28306    BOOT_JDK="$new_path"
28307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28309  fi
28310
28311  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28312  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28313
28314    else
28315      # We're on a unix platform. Hooray! :)
28316      path="$BOOT_JDK"
28317      has_space=`$ECHO "$path" | $GREP " "`
28318      if test "x$has_space" != x; then
28319        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28321        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28322      fi
28323
28324      # Use eval to expand a potential ~
28325      eval path="$path"
28326      if test ! -f "$path" && test ! -d "$path"; then
28327        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28328      fi
28329
28330      if test -d "$path"; then
28331        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28332      else
28333        dir="`$DIRNAME "$path"`"
28334        base="`$BASENAME "$path"`"
28335        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28336      fi
28337    fi
28338  fi
28339
28340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28341$as_echo_n "checking for Boot JDK... " >&6; }
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28343$as_echo "$BOOT_JDK" >&6; }
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28345$as_echo_n "checking Boot JDK version... " >&6; }
28346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28348$as_echo "$BOOT_JDK_VERSION" >&6; }
28349          fi # end check jdk version
28350        fi # end check javac
28351      fi # end check java
28352    fi # end check boot jdk found
28353  fi
28354
28355    done
28356  fi
28357
28358
28359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28361      # Do we have a bin/java?
28362      if test ! -x "$BOOT_JDK/bin/java"; then
28363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28365        BOOT_JDK_FOUND=no
28366      else
28367        # Do we have a bin/javac?
28368        if test ! -x "$BOOT_JDK/bin/javac"; then
28369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28373          BOOT_JDK_FOUND=no
28374        else
28375          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28376          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28377
28378          # Extra M4 quote needed to protect [] in grep expression.
28379          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28380          if test "x$FOUND_CORRECT_VERSION" = x; then
28381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28383            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28385            BOOT_JDK_FOUND=no
28386          else
28387            # We're done! :-)
28388            BOOT_JDK_FOUND=yes
28389
28390  # Only process if variable expands to non-empty
28391
28392  if test "x$BOOT_JDK" != x; then
28393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394
28395  # Input might be given as Windows format, start by converting to
28396  # unix format.
28397  path="$BOOT_JDK"
28398  new_path=`$CYGPATH -u "$path"`
28399
28400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28403  # "foo.exe" is OK but "foo" is an error.
28404  #
28405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28406  # It is also a way to make sure we got the proper file name for the real test later on.
28407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28408  if test "x$test_shortpath" = x; then
28409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28412  fi
28413
28414  # Call helper function which possibly converts this using DOS-style short mode.
28415  # If so, the updated path is stored in $new_path.
28416
28417  input_path="$new_path"
28418  # Check if we need to convert this using DOS-style short mode. If the path
28419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28420  # take no chances and rewrite it.
28421  # Note: m4 eats our [], so we need to use [ and ] instead.
28422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28423  if test "x$has_forbidden_chars" != x; then
28424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28428      # Going to short mode and back again did indeed matter. Since short mode is
28429      # case insensitive, let's make it lowercase to improve readability.
28430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28431      # Now convert it back to Unix-style (cygpath)
28432      input_path=`$CYGPATH -u "$shortmode_path"`
28433      new_path="$input_path"
28434    fi
28435  fi
28436
28437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28438  if test "x$test_cygdrive_prefix" = x; then
28439    # As a simple fix, exclude /usr/bin since it's not a real path.
28440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28442      # a path prefixed by /cygdrive for fixpath to work.
28443      new_path="$CYGWIN_ROOT_PATH$input_path"
28444    fi
28445  fi
28446
28447
28448  if test "x$path" != "x$new_path"; then
28449    BOOT_JDK="$new_path"
28450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28452  fi
28453
28454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28455
28456  path="$BOOT_JDK"
28457  has_colon=`$ECHO $path | $GREP ^.:`
28458  new_path="$path"
28459  if test "x$has_colon" = x; then
28460    # Not in mixed or Windows style, start by that.
28461    new_path=`cmd //c echo $path`
28462  fi
28463
28464
28465  input_path="$new_path"
28466  # Check if we need to convert this using DOS-style short mode. If the path
28467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28468  # take no chances and rewrite it.
28469  # Note: m4 eats our [], so we need to use [ and ] instead.
28470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28471  if test "x$has_forbidden_chars" != x; then
28472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28474  fi
28475
28476
28477  windows_path="$new_path"
28478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28479    unix_path=`$CYGPATH -u "$windows_path"`
28480    new_path="$unix_path"
28481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28483    new_path="$unix_path"
28484  fi
28485
28486  if test "x$path" != "x$new_path"; then
28487    BOOT_JDK="$new_path"
28488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28490  fi
28491
28492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28494
28495    else
28496      # We're on a unix platform. Hooray! :)
28497      path="$BOOT_JDK"
28498      has_space=`$ECHO "$path" | $GREP " "`
28499      if test "x$has_space" != x; then
28500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28503      fi
28504
28505      # Use eval to expand a potential ~
28506      eval path="$path"
28507      if test ! -f "$path" && test ! -d "$path"; then
28508        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28509      fi
28510
28511      if test -d "$path"; then
28512        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28513      else
28514        dir="`$DIRNAME "$path"`"
28515        base="`$BASENAME "$path"`"
28516        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28517      fi
28518    fi
28519  fi
28520
28521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28522$as_echo_n "checking for Boot JDK... " >&6; }
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28524$as_echo "$BOOT_JDK" >&6; }
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28526$as_echo_n "checking Boot JDK version... " >&6; }
28527            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28528            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28529$as_echo "$BOOT_JDK_VERSION" >&6; }
28530          fi # end check jdk version
28531        fi # end check javac
28532      fi # end check java
28533    fi # end check boot jdk found
28534  fi
28535
28536  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28537
28538  if test "x$BOOT_JDK_FOUND" = xno; then
28539    # Now execute the test
28540
28541  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28542  BOOT_JDK_SUFFIX="/Contents/Home"
28543  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28544  if test "x$ALL_JDKS_FOUND" != x; then
28545    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28546
28547  if test "x$BOOT_JDK_FOUND" = xno; then
28548    # Now execute the test
28549
28550        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28551        if test -d "$BOOT_JDK"; then
28552          BOOT_JDK_FOUND=maybe
28553          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28554$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28555        fi
28556
28557
28558    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28559    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28560      # Do we have a bin/java?
28561      if test ! -x "$BOOT_JDK/bin/java"; then
28562        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28564        BOOT_JDK_FOUND=no
28565      else
28566        # Do we have a bin/javac?
28567        if test ! -x "$BOOT_JDK/bin/javac"; then
28568          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28570          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28571$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28572          BOOT_JDK_FOUND=no
28573        else
28574          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28575          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28576
28577          # Extra M4 quote needed to protect [] in grep expression.
28578          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28579          if test "x$FOUND_CORRECT_VERSION" = x; then
28580            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28581$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28582            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28583$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28584            BOOT_JDK_FOUND=no
28585          else
28586            # We're done! :-)
28587            BOOT_JDK_FOUND=yes
28588
28589  # Only process if variable expands to non-empty
28590
28591  if test "x$BOOT_JDK" != x; then
28592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28593
28594  # Input might be given as Windows format, start by converting to
28595  # unix format.
28596  path="$BOOT_JDK"
28597  new_path=`$CYGPATH -u "$path"`
28598
28599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28602  # "foo.exe" is OK but "foo" is an error.
28603  #
28604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28605  # It is also a way to make sure we got the proper file name for the real test later on.
28606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28607  if test "x$test_shortpath" = x; then
28608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28611  fi
28612
28613  # Call helper function which possibly converts this using DOS-style short mode.
28614  # If so, the updated path is stored in $new_path.
28615
28616  input_path="$new_path"
28617  # Check if we need to convert this using DOS-style short mode. If the path
28618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28619  # take no chances and rewrite it.
28620  # Note: m4 eats our [], so we need to use [ and ] instead.
28621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28622  if test "x$has_forbidden_chars" != x; then
28623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28627      # Going to short mode and back again did indeed matter. Since short mode is
28628      # case insensitive, let's make it lowercase to improve readability.
28629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28630      # Now convert it back to Unix-style (cygpath)
28631      input_path=`$CYGPATH -u "$shortmode_path"`
28632      new_path="$input_path"
28633    fi
28634  fi
28635
28636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28637  if test "x$test_cygdrive_prefix" = x; then
28638    # As a simple fix, exclude /usr/bin since it's not a real path.
28639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28641      # a path prefixed by /cygdrive for fixpath to work.
28642      new_path="$CYGWIN_ROOT_PATH$input_path"
28643    fi
28644  fi
28645
28646
28647  if test "x$path" != "x$new_path"; then
28648    BOOT_JDK="$new_path"
28649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28650$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28651  fi
28652
28653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28654
28655  path="$BOOT_JDK"
28656  has_colon=`$ECHO $path | $GREP ^.:`
28657  new_path="$path"
28658  if test "x$has_colon" = x; then
28659    # Not in mixed or Windows style, start by that.
28660    new_path=`cmd //c echo $path`
28661  fi
28662
28663
28664  input_path="$new_path"
28665  # Check if we need to convert this using DOS-style short mode. If the path
28666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28667  # take no chances and rewrite it.
28668  # Note: m4 eats our [], so we need to use [ and ] instead.
28669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28670  if test "x$has_forbidden_chars" != x; then
28671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28673  fi
28674
28675
28676  windows_path="$new_path"
28677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28678    unix_path=`$CYGPATH -u "$windows_path"`
28679    new_path="$unix_path"
28680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28682    new_path="$unix_path"
28683  fi
28684
28685  if test "x$path" != "x$new_path"; then
28686    BOOT_JDK="$new_path"
28687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28689  fi
28690
28691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28693
28694    else
28695      # We're on a unix platform. Hooray! :)
28696      path="$BOOT_JDK"
28697      has_space=`$ECHO "$path" | $GREP " "`
28698      if test "x$has_space" != x; then
28699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28700$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28702      fi
28703
28704      # Use eval to expand a potential ~
28705      eval path="$path"
28706      if test ! -f "$path" && test ! -d "$path"; then
28707        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28708      fi
28709
28710      if test -d "$path"; then
28711        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28712      else
28713        dir="`$DIRNAME "$path"`"
28714        base="`$BASENAME "$path"`"
28715        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28716      fi
28717    fi
28718  fi
28719
28720            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28721$as_echo_n "checking for Boot JDK... " >&6; }
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28723$as_echo "$BOOT_JDK" >&6; }
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28725$as_echo_n "checking Boot JDK version... " >&6; }
28726            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28728$as_echo "$BOOT_JDK_VERSION" >&6; }
28729          fi # end check jdk version
28730        fi # end check javac
28731      fi # end check java
28732    fi # end check boot jdk found
28733  fi
28734
28735    done
28736  fi
28737
28738
28739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28741      # Do we have a bin/java?
28742      if test ! -x "$BOOT_JDK/bin/java"; then
28743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28745        BOOT_JDK_FOUND=no
28746      else
28747        # Do we have a bin/javac?
28748        if test ! -x "$BOOT_JDK/bin/javac"; then
28749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28753          BOOT_JDK_FOUND=no
28754        else
28755          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28756          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28757
28758          # Extra M4 quote needed to protect [] in grep expression.
28759          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28760          if test "x$FOUND_CORRECT_VERSION" = x; then
28761            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28762$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28764$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28765            BOOT_JDK_FOUND=no
28766          else
28767            # We're done! :-)
28768            BOOT_JDK_FOUND=yes
28769
28770  # Only process if variable expands to non-empty
28771
28772  if test "x$BOOT_JDK" != x; then
28773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28774
28775  # Input might be given as Windows format, start by converting to
28776  # unix format.
28777  path="$BOOT_JDK"
28778  new_path=`$CYGPATH -u "$path"`
28779
28780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28783  # "foo.exe" is OK but "foo" is an error.
28784  #
28785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28786  # It is also a way to make sure we got the proper file name for the real test later on.
28787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28788  if test "x$test_shortpath" = x; then
28789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28791    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28792  fi
28793
28794  # Call helper function which possibly converts this using DOS-style short mode.
28795  # If so, the updated path is stored in $new_path.
28796
28797  input_path="$new_path"
28798  # Check if we need to convert this using DOS-style short mode. If the path
28799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28800  # take no chances and rewrite it.
28801  # Note: m4 eats our [], so we need to use [ and ] instead.
28802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28803  if test "x$has_forbidden_chars" != x; then
28804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28808      # Going to short mode and back again did indeed matter. Since short mode is
28809      # case insensitive, let's make it lowercase to improve readability.
28810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28811      # Now convert it back to Unix-style (cygpath)
28812      input_path=`$CYGPATH -u "$shortmode_path"`
28813      new_path="$input_path"
28814    fi
28815  fi
28816
28817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28818  if test "x$test_cygdrive_prefix" = x; then
28819    # As a simple fix, exclude /usr/bin since it's not a real path.
28820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28822      # a path prefixed by /cygdrive for fixpath to work.
28823      new_path="$CYGWIN_ROOT_PATH$input_path"
28824    fi
28825  fi
28826
28827
28828  if test "x$path" != "x$new_path"; then
28829    BOOT_JDK="$new_path"
28830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28831$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28832  fi
28833
28834    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28835
28836  path="$BOOT_JDK"
28837  has_colon=`$ECHO $path | $GREP ^.:`
28838  new_path="$path"
28839  if test "x$has_colon" = x; then
28840    # Not in mixed or Windows style, start by that.
28841    new_path=`cmd //c echo $path`
28842  fi
28843
28844
28845  input_path="$new_path"
28846  # Check if we need to convert this using DOS-style short mode. If the path
28847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28848  # take no chances and rewrite it.
28849  # Note: m4 eats our [], so we need to use [ and ] instead.
28850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28851  if test "x$has_forbidden_chars" != x; then
28852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28854  fi
28855
28856
28857  windows_path="$new_path"
28858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28859    unix_path=`$CYGPATH -u "$windows_path"`
28860    new_path="$unix_path"
28861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28863    new_path="$unix_path"
28864  fi
28865
28866  if test "x$path" != "x$new_path"; then
28867    BOOT_JDK="$new_path"
28868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28870  fi
28871
28872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28874
28875    else
28876      # We're on a unix platform. Hooray! :)
28877      path="$BOOT_JDK"
28878      has_space=`$ECHO "$path" | $GREP " "`
28879      if test "x$has_space" != x; then
28880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28881$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28882        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28883      fi
28884
28885      # Use eval to expand a potential ~
28886      eval path="$path"
28887      if test ! -f "$path" && test ! -d "$path"; then
28888        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28889      fi
28890
28891      if test -d "$path"; then
28892        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28893      else
28894        dir="`$DIRNAME "$path"`"
28895        base="`$BASENAME "$path"`"
28896        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28897      fi
28898    fi
28899  fi
28900
28901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28902$as_echo_n "checking for Boot JDK... " >&6; }
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28904$as_echo "$BOOT_JDK" >&6; }
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28906$as_echo_n "checking Boot JDK version... " >&6; }
28907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28909$as_echo "$BOOT_JDK_VERSION" >&6; }
28910          fi # end check jdk version
28911        fi # end check javac
28912      fi # end check java
28913    fi # end check boot jdk found
28914  fi
28915
28916
28917  if test "x$BOOT_JDK_FOUND" = xno; then
28918    # Now execute the test
28919
28920  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28921  BOOT_JDK_SUFFIX="/Contents/Home"
28922  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28923  if test "x$ALL_JDKS_FOUND" != x; then
28924    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28925
28926  if test "x$BOOT_JDK_FOUND" = xno; then
28927    # Now execute the test
28928
28929        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28930        if test -d "$BOOT_JDK"; then
28931          BOOT_JDK_FOUND=maybe
28932          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28933$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28934        fi
28935
28936
28937    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28938    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28939      # Do we have a bin/java?
28940      if test ! -x "$BOOT_JDK/bin/java"; then
28941        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28942$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28943        BOOT_JDK_FOUND=no
28944      else
28945        # Do we have a bin/javac?
28946        if test ! -x "$BOOT_JDK/bin/javac"; then
28947          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28948$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28950$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28951          BOOT_JDK_FOUND=no
28952        else
28953          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28954          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28955
28956          # Extra M4 quote needed to protect [] in grep expression.
28957          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28958          if test "x$FOUND_CORRECT_VERSION" = x; then
28959            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28960$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28961            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28962$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28963            BOOT_JDK_FOUND=no
28964          else
28965            # We're done! :-)
28966            BOOT_JDK_FOUND=yes
28967
28968  # Only process if variable expands to non-empty
28969
28970  if test "x$BOOT_JDK" != x; then
28971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28972
28973  # Input might be given as Windows format, start by converting to
28974  # unix format.
28975  path="$BOOT_JDK"
28976  new_path=`$CYGPATH -u "$path"`
28977
28978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28981  # "foo.exe" is OK but "foo" is an error.
28982  #
28983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28984  # It is also a way to make sure we got the proper file name for the real test later on.
28985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28986  if test "x$test_shortpath" = x; then
28987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28989    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28990  fi
28991
28992  # Call helper function which possibly converts this using DOS-style short mode.
28993  # If so, the updated path is stored in $new_path.
28994
28995  input_path="$new_path"
28996  # Check if we need to convert this using DOS-style short mode. If the path
28997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28998  # take no chances and rewrite it.
28999  # Note: m4 eats our [], so we need to use [ and ] instead.
29000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29001  if test "x$has_forbidden_chars" != x; then
29002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29006      # Going to short mode and back again did indeed matter. Since short mode is
29007      # case insensitive, let's make it lowercase to improve readability.
29008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29009      # Now convert it back to Unix-style (cygpath)
29010      input_path=`$CYGPATH -u "$shortmode_path"`
29011      new_path="$input_path"
29012    fi
29013  fi
29014
29015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29016  if test "x$test_cygdrive_prefix" = x; then
29017    # As a simple fix, exclude /usr/bin since it's not a real path.
29018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29020      # a path prefixed by /cygdrive for fixpath to work.
29021      new_path="$CYGWIN_ROOT_PATH$input_path"
29022    fi
29023  fi
29024
29025
29026  if test "x$path" != "x$new_path"; then
29027    BOOT_JDK="$new_path"
29028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29029$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29030  fi
29031
29032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29033
29034  path="$BOOT_JDK"
29035  has_colon=`$ECHO $path | $GREP ^.:`
29036  new_path="$path"
29037  if test "x$has_colon" = x; then
29038    # Not in mixed or Windows style, start by that.
29039    new_path=`cmd //c echo $path`
29040  fi
29041
29042
29043  input_path="$new_path"
29044  # Check if we need to convert this using DOS-style short mode. If the path
29045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29046  # take no chances and rewrite it.
29047  # Note: m4 eats our [], so we need to use [ and ] instead.
29048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29049  if test "x$has_forbidden_chars" != x; then
29050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29052  fi
29053
29054
29055  windows_path="$new_path"
29056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29057    unix_path=`$CYGPATH -u "$windows_path"`
29058    new_path="$unix_path"
29059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29061    new_path="$unix_path"
29062  fi
29063
29064  if test "x$path" != "x$new_path"; then
29065    BOOT_JDK="$new_path"
29066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29067$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29068  fi
29069
29070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29072
29073    else
29074      # We're on a unix platform. Hooray! :)
29075      path="$BOOT_JDK"
29076      has_space=`$ECHO "$path" | $GREP " "`
29077      if test "x$has_space" != x; then
29078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29081      fi
29082
29083      # Use eval to expand a potential ~
29084      eval path="$path"
29085      if test ! -f "$path" && test ! -d "$path"; then
29086        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29087      fi
29088
29089      if test -d "$path"; then
29090        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29091      else
29092        dir="`$DIRNAME "$path"`"
29093        base="`$BASENAME "$path"`"
29094        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29095      fi
29096    fi
29097  fi
29098
29099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29100$as_echo_n "checking for Boot JDK... " >&6; }
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29102$as_echo "$BOOT_JDK" >&6; }
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29104$as_echo_n "checking Boot JDK version... " >&6; }
29105            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29106            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29107$as_echo "$BOOT_JDK_VERSION" >&6; }
29108          fi # end check jdk version
29109        fi # end check javac
29110      fi # end check java
29111    fi # end check boot jdk found
29112  fi
29113
29114    done
29115  fi
29116
29117
29118    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29119    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29120      # Do we have a bin/java?
29121      if test ! -x "$BOOT_JDK/bin/java"; then
29122        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29124        BOOT_JDK_FOUND=no
29125      else
29126        # Do we have a bin/javac?
29127        if test ! -x "$BOOT_JDK/bin/javac"; then
29128          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29130          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29131$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29132          BOOT_JDK_FOUND=no
29133        else
29134          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29135          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29136
29137          # Extra M4 quote needed to protect [] in grep expression.
29138          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29139          if test "x$FOUND_CORRECT_VERSION" = x; then
29140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29142            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29143$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29144            BOOT_JDK_FOUND=no
29145          else
29146            # We're done! :-)
29147            BOOT_JDK_FOUND=yes
29148
29149  # Only process if variable expands to non-empty
29150
29151  if test "x$BOOT_JDK" != x; then
29152    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29153
29154  # Input might be given as Windows format, start by converting to
29155  # unix format.
29156  path="$BOOT_JDK"
29157  new_path=`$CYGPATH -u "$path"`
29158
29159  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29160  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29161  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29162  # "foo.exe" is OK but "foo" is an error.
29163  #
29164  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29165  # It is also a way to make sure we got the proper file name for the real test later on.
29166  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29167  if test "x$test_shortpath" = x; then
29168    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29170    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29171  fi
29172
29173  # Call helper function which possibly converts this using DOS-style short mode.
29174  # If so, the updated path is stored in $new_path.
29175
29176  input_path="$new_path"
29177  # Check if we need to convert this using DOS-style short mode. If the path
29178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29179  # take no chances and rewrite it.
29180  # Note: m4 eats our [], so we need to use [ and ] instead.
29181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29182  if test "x$has_forbidden_chars" != x; then
29183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29187      # Going to short mode and back again did indeed matter. Since short mode is
29188      # case insensitive, let's make it lowercase to improve readability.
29189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29190      # Now convert it back to Unix-style (cygpath)
29191      input_path=`$CYGPATH -u "$shortmode_path"`
29192      new_path="$input_path"
29193    fi
29194  fi
29195
29196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29197  if test "x$test_cygdrive_prefix" = x; then
29198    # As a simple fix, exclude /usr/bin since it's not a real path.
29199    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29201      # a path prefixed by /cygdrive for fixpath to work.
29202      new_path="$CYGWIN_ROOT_PATH$input_path"
29203    fi
29204  fi
29205
29206
29207  if test "x$path" != "x$new_path"; then
29208    BOOT_JDK="$new_path"
29209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29211  fi
29212
29213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29214
29215  path="$BOOT_JDK"
29216  has_colon=`$ECHO $path | $GREP ^.:`
29217  new_path="$path"
29218  if test "x$has_colon" = x; then
29219    # Not in mixed or Windows style, start by that.
29220    new_path=`cmd //c echo $path`
29221  fi
29222
29223
29224  input_path="$new_path"
29225  # Check if we need to convert this using DOS-style short mode. If the path
29226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29227  # take no chances and rewrite it.
29228  # Note: m4 eats our [], so we need to use [ and ] instead.
29229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29230  if test "x$has_forbidden_chars" != x; then
29231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29233  fi
29234
29235
29236  windows_path="$new_path"
29237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29238    unix_path=`$CYGPATH -u "$windows_path"`
29239    new_path="$unix_path"
29240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29242    new_path="$unix_path"
29243  fi
29244
29245  if test "x$path" != "x$new_path"; then
29246    BOOT_JDK="$new_path"
29247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29249  fi
29250
29251  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29252  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29253
29254    else
29255      # We're on a unix platform. Hooray! :)
29256      path="$BOOT_JDK"
29257      has_space=`$ECHO "$path" | $GREP " "`
29258      if test "x$has_space" != x; then
29259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29260$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29261        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29262      fi
29263
29264      # Use eval to expand a potential ~
29265      eval path="$path"
29266      if test ! -f "$path" && test ! -d "$path"; then
29267        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29268      fi
29269
29270      if test -d "$path"; then
29271        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29272      else
29273        dir="`$DIRNAME "$path"`"
29274        base="`$BASENAME "$path"`"
29275        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29276      fi
29277    fi
29278  fi
29279
29280            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29281$as_echo_n "checking for Boot JDK... " >&6; }
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29283$as_echo "$BOOT_JDK" >&6; }
29284            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29285$as_echo_n "checking Boot JDK version... " >&6; }
29286            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29288$as_echo "$BOOT_JDK_VERSION" >&6; }
29289          fi # end check jdk version
29290        fi # end check javac
29291      fi # end check java
29292    fi # end check boot jdk found
29293  fi
29294
29295  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29296
29297  if test "x$BOOT_JDK_FOUND" = xno; then
29298    # Now execute the test
29299
29300  BOOT_JDK_PREFIX="/usr/lib/jvm"
29301  BOOT_JDK_SUFFIX=""
29302  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29303  if test "x$ALL_JDKS_FOUND" != x; then
29304    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29305
29306  if test "x$BOOT_JDK_FOUND" = xno; then
29307    # Now execute the test
29308
29309        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29310        if test -d "$BOOT_JDK"; then
29311          BOOT_JDK_FOUND=maybe
29312          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29313$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29314        fi
29315
29316
29317    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29318    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29319      # Do we have a bin/java?
29320      if test ! -x "$BOOT_JDK/bin/java"; then
29321        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29323        BOOT_JDK_FOUND=no
29324      else
29325        # Do we have a bin/javac?
29326        if test ! -x "$BOOT_JDK/bin/javac"; then
29327          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29328$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29329          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29330$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29331          BOOT_JDK_FOUND=no
29332        else
29333          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29334          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29335
29336          # Extra M4 quote needed to protect [] in grep expression.
29337          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29338          if test "x$FOUND_CORRECT_VERSION" = x; then
29339            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29340$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29341            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29342$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29343            BOOT_JDK_FOUND=no
29344          else
29345            # We're done! :-)
29346            BOOT_JDK_FOUND=yes
29347
29348  # Only process if variable expands to non-empty
29349
29350  if test "x$BOOT_JDK" != x; then
29351    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29352
29353  # Input might be given as Windows format, start by converting to
29354  # unix format.
29355  path="$BOOT_JDK"
29356  new_path=`$CYGPATH -u "$path"`
29357
29358  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29359  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29360  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29361  # "foo.exe" is OK but "foo" is an error.
29362  #
29363  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29364  # It is also a way to make sure we got the proper file name for the real test later on.
29365  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29366  if test "x$test_shortpath" = x; then
29367    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29368$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29369    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29370  fi
29371
29372  # Call helper function which possibly converts this using DOS-style short mode.
29373  # If so, the updated path is stored in $new_path.
29374
29375  input_path="$new_path"
29376  # Check if we need to convert this using DOS-style short mode. If the path
29377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29378  # take no chances and rewrite it.
29379  # Note: m4 eats our [], so we need to use [ and ] instead.
29380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29381  if test "x$has_forbidden_chars" != x; then
29382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29386      # Going to short mode and back again did indeed matter. Since short mode is
29387      # case insensitive, let's make it lowercase to improve readability.
29388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29389      # Now convert it back to Unix-style (cygpath)
29390      input_path=`$CYGPATH -u "$shortmode_path"`
29391      new_path="$input_path"
29392    fi
29393  fi
29394
29395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29396  if test "x$test_cygdrive_prefix" = x; then
29397    # As a simple fix, exclude /usr/bin since it's not a real path.
29398    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29400      # a path prefixed by /cygdrive for fixpath to work.
29401      new_path="$CYGWIN_ROOT_PATH$input_path"
29402    fi
29403  fi
29404
29405
29406  if test "x$path" != "x$new_path"; then
29407    BOOT_JDK="$new_path"
29408    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29409$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29410  fi
29411
29412    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29413
29414  path="$BOOT_JDK"
29415  has_colon=`$ECHO $path | $GREP ^.:`
29416  new_path="$path"
29417  if test "x$has_colon" = x; then
29418    # Not in mixed or Windows style, start by that.
29419    new_path=`cmd //c echo $path`
29420  fi
29421
29422
29423  input_path="$new_path"
29424  # Check if we need to convert this using DOS-style short mode. If the path
29425  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29426  # take no chances and rewrite it.
29427  # Note: m4 eats our [], so we need to use [ and ] instead.
29428  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29429  if test "x$has_forbidden_chars" != x; then
29430    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29431    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29432  fi
29433
29434
29435  windows_path="$new_path"
29436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29437    unix_path=`$CYGPATH -u "$windows_path"`
29438    new_path="$unix_path"
29439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29441    new_path="$unix_path"
29442  fi
29443
29444  if test "x$path" != "x$new_path"; then
29445    BOOT_JDK="$new_path"
29446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29447$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29448  fi
29449
29450  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29451  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29452
29453    else
29454      # We're on a unix platform. Hooray! :)
29455      path="$BOOT_JDK"
29456      has_space=`$ECHO "$path" | $GREP " "`
29457      if test "x$has_space" != x; then
29458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29460        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29461      fi
29462
29463      # Use eval to expand a potential ~
29464      eval path="$path"
29465      if test ! -f "$path" && test ! -d "$path"; then
29466        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29467      fi
29468
29469      if test -d "$path"; then
29470        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29471      else
29472        dir="`$DIRNAME "$path"`"
29473        base="`$BASENAME "$path"`"
29474        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29475      fi
29476    fi
29477  fi
29478
29479            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29480$as_echo_n "checking for Boot JDK... " >&6; }
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29482$as_echo "$BOOT_JDK" >&6; }
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29484$as_echo_n "checking Boot JDK version... " >&6; }
29485            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29487$as_echo "$BOOT_JDK_VERSION" >&6; }
29488          fi # end check jdk version
29489        fi # end check javac
29490      fi # end check java
29491    fi # end check boot jdk found
29492  fi
29493
29494    done
29495  fi
29496
29497
29498    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29499    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29500      # Do we have a bin/java?
29501      if test ! -x "$BOOT_JDK/bin/java"; then
29502        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29503$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29504        BOOT_JDK_FOUND=no
29505      else
29506        # Do we have a bin/javac?
29507        if test ! -x "$BOOT_JDK/bin/javac"; then
29508          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29511$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29512          BOOT_JDK_FOUND=no
29513        else
29514          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29515          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29516
29517          # Extra M4 quote needed to protect [] in grep expression.
29518          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29519          if test "x$FOUND_CORRECT_VERSION" = x; then
29520            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29522            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29523$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29524            BOOT_JDK_FOUND=no
29525          else
29526            # We're done! :-)
29527            BOOT_JDK_FOUND=yes
29528
29529  # Only process if variable expands to non-empty
29530
29531  if test "x$BOOT_JDK" != x; then
29532    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29533
29534  # Input might be given as Windows format, start by converting to
29535  # unix format.
29536  path="$BOOT_JDK"
29537  new_path=`$CYGPATH -u "$path"`
29538
29539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29542  # "foo.exe" is OK but "foo" is an error.
29543  #
29544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29545  # It is also a way to make sure we got the proper file name for the real test later on.
29546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29547  if test "x$test_shortpath" = x; then
29548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29550    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29551  fi
29552
29553  # Call helper function which possibly converts this using DOS-style short mode.
29554  # If so, the updated path is stored in $new_path.
29555
29556  input_path="$new_path"
29557  # Check if we need to convert this using DOS-style short mode. If the path
29558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29559  # take no chances and rewrite it.
29560  # Note: m4 eats our [], so we need to use [ and ] instead.
29561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29562  if test "x$has_forbidden_chars" != x; then
29563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29567      # Going to short mode and back again did indeed matter. Since short mode is
29568      # case insensitive, let's make it lowercase to improve readability.
29569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29570      # Now convert it back to Unix-style (cygpath)
29571      input_path=`$CYGPATH -u "$shortmode_path"`
29572      new_path="$input_path"
29573    fi
29574  fi
29575
29576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29577  if test "x$test_cygdrive_prefix" = x; then
29578    # As a simple fix, exclude /usr/bin since it's not a real path.
29579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29581      # a path prefixed by /cygdrive for fixpath to work.
29582      new_path="$CYGWIN_ROOT_PATH$input_path"
29583    fi
29584  fi
29585
29586
29587  if test "x$path" != "x$new_path"; then
29588    BOOT_JDK="$new_path"
29589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29591  fi
29592
29593    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29594
29595  path="$BOOT_JDK"
29596  has_colon=`$ECHO $path | $GREP ^.:`
29597  new_path="$path"
29598  if test "x$has_colon" = x; then
29599    # Not in mixed or Windows style, start by that.
29600    new_path=`cmd //c echo $path`
29601  fi
29602
29603
29604  input_path="$new_path"
29605  # Check if we need to convert this using DOS-style short mode. If the path
29606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29607  # take no chances and rewrite it.
29608  # Note: m4 eats our [], so we need to use [ and ] instead.
29609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29610  if test "x$has_forbidden_chars" != x; then
29611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29613  fi
29614
29615
29616  windows_path="$new_path"
29617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29618    unix_path=`$CYGPATH -u "$windows_path"`
29619    new_path="$unix_path"
29620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29622    new_path="$unix_path"
29623  fi
29624
29625  if test "x$path" != "x$new_path"; then
29626    BOOT_JDK="$new_path"
29627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29629  fi
29630
29631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29633
29634    else
29635      # We're on a unix platform. Hooray! :)
29636      path="$BOOT_JDK"
29637      has_space=`$ECHO "$path" | $GREP " "`
29638      if test "x$has_space" != x; then
29639        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29640$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29641        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29642      fi
29643
29644      # Use eval to expand a potential ~
29645      eval path="$path"
29646      if test ! -f "$path" && test ! -d "$path"; then
29647        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29648      fi
29649
29650      if test -d "$path"; then
29651        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29652      else
29653        dir="`$DIRNAME "$path"`"
29654        base="`$BASENAME "$path"`"
29655        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29656      fi
29657    fi
29658  fi
29659
29660            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29661$as_echo_n "checking for Boot JDK... " >&6; }
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29663$as_echo "$BOOT_JDK" >&6; }
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29665$as_echo_n "checking Boot JDK version... " >&6; }
29666            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29668$as_echo "$BOOT_JDK_VERSION" >&6; }
29669          fi # end check jdk version
29670        fi # end check javac
29671      fi # end check java
29672    fi # end check boot jdk found
29673  fi
29674
29675  fi
29676
29677
29678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29680      # Do we have a bin/java?
29681      if test ! -x "$BOOT_JDK/bin/java"; then
29682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29684        BOOT_JDK_FOUND=no
29685      else
29686        # Do we have a bin/javac?
29687        if test ! -x "$BOOT_JDK/bin/javac"; then
29688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29692          BOOT_JDK_FOUND=no
29693        else
29694          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29695          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29696
29697          # Extra M4 quote needed to protect [] in grep expression.
29698          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29699          if test "x$FOUND_CORRECT_VERSION" = x; then
29700            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29702            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29703$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29704            BOOT_JDK_FOUND=no
29705          else
29706            # We're done! :-)
29707            BOOT_JDK_FOUND=yes
29708
29709  # Only process if variable expands to non-empty
29710
29711  if test "x$BOOT_JDK" != x; then
29712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29713
29714  # Input might be given as Windows format, start by converting to
29715  # unix format.
29716  path="$BOOT_JDK"
29717  new_path=`$CYGPATH -u "$path"`
29718
29719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29722  # "foo.exe" is OK but "foo" is an error.
29723  #
29724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29725  # It is also a way to make sure we got the proper file name for the real test later on.
29726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29727  if test "x$test_shortpath" = x; then
29728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29731  fi
29732
29733  # Call helper function which possibly converts this using DOS-style short mode.
29734  # If so, the updated path is stored in $new_path.
29735
29736  input_path="$new_path"
29737  # Check if we need to convert this using DOS-style short mode. If the path
29738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29739  # take no chances and rewrite it.
29740  # Note: m4 eats our [], so we need to use [ and ] instead.
29741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29742  if test "x$has_forbidden_chars" != x; then
29743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29747      # Going to short mode and back again did indeed matter. Since short mode is
29748      # case insensitive, let's make it lowercase to improve readability.
29749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29750      # Now convert it back to Unix-style (cygpath)
29751      input_path=`$CYGPATH -u "$shortmode_path"`
29752      new_path="$input_path"
29753    fi
29754  fi
29755
29756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29757  if test "x$test_cygdrive_prefix" = x; then
29758    # As a simple fix, exclude /usr/bin since it's not a real path.
29759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29761      # a path prefixed by /cygdrive for fixpath to work.
29762      new_path="$CYGWIN_ROOT_PATH$input_path"
29763    fi
29764  fi
29765
29766
29767  if test "x$path" != "x$new_path"; then
29768    BOOT_JDK="$new_path"
29769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29771  fi
29772
29773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29774
29775  path="$BOOT_JDK"
29776  has_colon=`$ECHO $path | $GREP ^.:`
29777  new_path="$path"
29778  if test "x$has_colon" = x; then
29779    # Not in mixed or Windows style, start by that.
29780    new_path=`cmd //c echo $path`
29781  fi
29782
29783
29784  input_path="$new_path"
29785  # Check if we need to convert this using DOS-style short mode. If the path
29786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29787  # take no chances and rewrite it.
29788  # Note: m4 eats our [], so we need to use [ and ] instead.
29789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29790  if test "x$has_forbidden_chars" != x; then
29791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29793  fi
29794
29795
29796  windows_path="$new_path"
29797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29798    unix_path=`$CYGPATH -u "$windows_path"`
29799    new_path="$unix_path"
29800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29802    new_path="$unix_path"
29803  fi
29804
29805  if test "x$path" != "x$new_path"; then
29806    BOOT_JDK="$new_path"
29807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29809  fi
29810
29811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29813
29814    else
29815      # We're on a unix platform. Hooray! :)
29816      path="$BOOT_JDK"
29817      has_space=`$ECHO "$path" | $GREP " "`
29818      if test "x$has_space" != x; then
29819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29822      fi
29823
29824      # Use eval to expand a potential ~
29825      eval path="$path"
29826      if test ! -f "$path" && test ! -d "$path"; then
29827        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29828      fi
29829
29830      if test -d "$path"; then
29831        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29832      else
29833        dir="`$DIRNAME "$path"`"
29834        base="`$BASENAME "$path"`"
29835        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29836      fi
29837    fi
29838  fi
29839
29840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29841$as_echo_n "checking for Boot JDK... " >&6; }
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29843$as_echo "$BOOT_JDK" >&6; }
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29845$as_echo_n "checking Boot JDK version... " >&6; }
29846            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29848$as_echo "$BOOT_JDK_VERSION" >&6; }
29849          fi # end check jdk version
29850        fi # end check javac
29851      fi # end check java
29852    fi # end check boot jdk found
29853  fi
29854
29855
29856  # If we haven't found anything yet, we've truly lost. Give up.
29857  if test "x$BOOT_JDK_FOUND" = xno; then
29858
29859  # Print a helpful message on how to acquire the necessary build dependency.
29860  # openjdk is the help tag: freetype, cups, alsa etc
29861  MISSING_DEPENDENCY=openjdk
29862
29863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29864    cygwin_help $MISSING_DEPENDENCY
29865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29866    msys_help $MISSING_DEPENDENCY
29867  else
29868    PKGHANDLER_COMMAND=
29869
29870    case $PKGHANDLER in
29871      apt-get)
29872        apt_help     $MISSING_DEPENDENCY ;;
29873      yum)
29874        yum_help     $MISSING_DEPENDENCY ;;
29875      port)
29876        port_help    $MISSING_DEPENDENCY ;;
29877      pkgutil)
29878        pkgutil_help $MISSING_DEPENDENCY ;;
29879      pkgadd)
29880        pkgadd_help  $MISSING_DEPENDENCY ;;
29881    esac
29882
29883    if test "x$PKGHANDLER_COMMAND" != x; then
29884      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29885    fi
29886  fi
29887
29888    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29889$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29891$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29892    as_fn_error $? "Cannot continue" "$LINENO" 5
29893  fi
29894
29895
29896
29897  # Setup tools from the Boot JDK.
29898
29899  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29900
29901  # Publish this variable in the help.
29902
29903
29904  if [ -z "${JAVA+x}" ]; then
29905    # The variable is not set by user, try to locate tool using the code snippet
29906
29907      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29908$as_echo_n "checking for java in Boot JDK... " >&6; }
29909      JAVA=$BOOT_JDK/bin/java
29910      if test ! -x $JAVA; then
29911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29912$as_echo "not found" >&6; }
29913        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29914$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29915        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29916      fi
29917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29918$as_echo "ok" >&6; }
29919
29920
29921  else
29922    # The variable is set, but is it from the command line or the environment?
29923
29924    # Try to remove the string !JAVA! from our list.
29925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29927      # If it failed, the variable was not from the command line. Ignore it,
29928      # but warn the user (except for BASH, which is always set by the calling BASH).
29929      if test "xJAVA" != xBASH; then
29930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29931$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29932      fi
29933      # Try to locate tool using the code snippet
29934
29935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29936$as_echo_n "checking for java in Boot JDK... " >&6; }
29937      JAVA=$BOOT_JDK/bin/java
29938      if test ! -x $JAVA; then
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29940$as_echo "not found" >&6; }
29941        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29942$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29943        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29944      fi
29945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29946$as_echo "ok" >&6; }
29947
29948
29949    else
29950      # If it succeeded, then it was overridden by the user. We will use it
29951      # for the tool.
29952
29953      # First remove it from the list of overridden variables, so we can test
29954      # for unknown variables in the end.
29955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29956
29957      # Check if we try to supply an empty value
29958      if test "x$JAVA" = x; then
29959        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29960$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29962$as_echo_n "checking for JAVA... " >&6; }
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29964$as_echo "disabled" >&6; }
29965      else
29966        # Check if the provided tool contains a complete path.
29967        tool_specified="$JAVA"
29968        tool_basename="${tool_specified##*/}"
29969        if test "x$tool_basename" = "x$tool_specified"; then
29970          # A command without a complete path is provided, search $PATH.
29971          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29972$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29973          # Extract the first word of "$tool_basename", so it can be a program name with args.
29974set dummy $tool_basename; ac_word=$2
29975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29976$as_echo_n "checking for $ac_word... " >&6; }
29977if ${ac_cv_path_JAVA+:} false; then :
29978  $as_echo_n "(cached) " >&6
29979else
29980  case $JAVA in
29981  [\\/]* | ?:[\\/]*)
29982  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29983  ;;
29984  *)
29985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29986for as_dir in $PATH
29987do
29988  IFS=$as_save_IFS
29989  test -z "$as_dir" && as_dir=.
29990    for ac_exec_ext in '' $ac_executable_extensions; do
29991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29992    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29994    break 2
29995  fi
29996done
29997  done
29998IFS=$as_save_IFS
29999
30000  ;;
30001esac
30002fi
30003JAVA=$ac_cv_path_JAVA
30004if test -n "$JAVA"; then
30005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30006$as_echo "$JAVA" >&6; }
30007else
30008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30009$as_echo "no" >&6; }
30010fi
30011
30012
30013          if test "x$JAVA" = x; then
30014            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30015          fi
30016        else
30017          # Otherwise we believe it is a complete path. Use it as it is.
30018          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30019$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30020          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30021$as_echo_n "checking for JAVA... " >&6; }
30022          if test ! -x "$tool_specified"; then
30023            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30024$as_echo "not found" >&6; }
30025            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30026          fi
30027          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30028$as_echo "$tool_specified" >&6; }
30029        fi
30030      fi
30031    fi
30032
30033  fi
30034
30035
30036
30037  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30038
30039  # Publish this variable in the help.
30040
30041
30042  if [ -z "${JAVAC+x}" ]; then
30043    # The variable is not set by user, try to locate tool using the code snippet
30044
30045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30046$as_echo_n "checking for javac in Boot JDK... " >&6; }
30047      JAVAC=$BOOT_JDK/bin/javac
30048      if test ! -x $JAVAC; then
30049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30050$as_echo "not found" >&6; }
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30052$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30053        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30054      fi
30055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30056$as_echo "ok" >&6; }
30057
30058
30059  else
30060    # The variable is set, but is it from the command line or the environment?
30061
30062    # Try to remove the string !JAVAC! from our list.
30063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30065      # If it failed, the variable was not from the command line. Ignore it,
30066      # but warn the user (except for BASH, which is always set by the calling BASH).
30067      if test "xJAVAC" != xBASH; then
30068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30069$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30070      fi
30071      # Try to locate tool using the code snippet
30072
30073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30074$as_echo_n "checking for javac in Boot JDK... " >&6; }
30075      JAVAC=$BOOT_JDK/bin/javac
30076      if test ! -x $JAVAC; then
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30078$as_echo "not found" >&6; }
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30080$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30081        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30082      fi
30083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30084$as_echo "ok" >&6; }
30085
30086
30087    else
30088      # If it succeeded, then it was overridden by the user. We will use it
30089      # for the tool.
30090
30091      # First remove it from the list of overridden variables, so we can test
30092      # for unknown variables in the end.
30093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30094
30095      # Check if we try to supply an empty value
30096      if test "x$JAVAC" = x; then
30097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30098$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30100$as_echo_n "checking for JAVAC... " >&6; }
30101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30102$as_echo "disabled" >&6; }
30103      else
30104        # Check if the provided tool contains a complete path.
30105        tool_specified="$JAVAC"
30106        tool_basename="${tool_specified##*/}"
30107        if test "x$tool_basename" = "x$tool_specified"; then
30108          # A command without a complete path is provided, search $PATH.
30109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30110$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30111          # Extract the first word of "$tool_basename", so it can be a program name with args.
30112set dummy $tool_basename; ac_word=$2
30113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30114$as_echo_n "checking for $ac_word... " >&6; }
30115if ${ac_cv_path_JAVAC+:} false; then :
30116  $as_echo_n "(cached) " >&6
30117else
30118  case $JAVAC in
30119  [\\/]* | ?:[\\/]*)
30120  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30121  ;;
30122  *)
30123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30124for as_dir in $PATH
30125do
30126  IFS=$as_save_IFS
30127  test -z "$as_dir" && as_dir=.
30128    for ac_exec_ext in '' $ac_executable_extensions; do
30129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30130    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30132    break 2
30133  fi
30134done
30135  done
30136IFS=$as_save_IFS
30137
30138  ;;
30139esac
30140fi
30141JAVAC=$ac_cv_path_JAVAC
30142if test -n "$JAVAC"; then
30143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30144$as_echo "$JAVAC" >&6; }
30145else
30146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30147$as_echo "no" >&6; }
30148fi
30149
30150
30151          if test "x$JAVAC" = x; then
30152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30153          fi
30154        else
30155          # Otherwise we believe it is a complete path. Use it as it is.
30156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30157$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30159$as_echo_n "checking for JAVAC... " >&6; }
30160          if test ! -x "$tool_specified"; then
30161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30162$as_echo "not found" >&6; }
30163            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30164          fi
30165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30166$as_echo "$tool_specified" >&6; }
30167        fi
30168      fi
30169    fi
30170
30171  fi
30172
30173
30174
30175  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30176
30177  # Publish this variable in the help.
30178
30179
30180  if [ -z "${JAVAH+x}" ]; then
30181    # The variable is not set by user, try to locate tool using the code snippet
30182
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30184$as_echo_n "checking for javah in Boot JDK... " >&6; }
30185      JAVAH=$BOOT_JDK/bin/javah
30186      if test ! -x $JAVAH; then
30187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30188$as_echo "not found" >&6; }
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30190$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30191        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30192      fi
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30194$as_echo "ok" >&6; }
30195
30196
30197  else
30198    # The variable is set, but is it from the command line or the environment?
30199
30200    # Try to remove the string !JAVAH! from our list.
30201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30203      # If it failed, the variable was not from the command line. Ignore it,
30204      # but warn the user (except for BASH, which is always set by the calling BASH).
30205      if test "xJAVAH" != xBASH; then
30206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30207$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30208      fi
30209      # Try to locate tool using the code snippet
30210
30211      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30212$as_echo_n "checking for javah in Boot JDK... " >&6; }
30213      JAVAH=$BOOT_JDK/bin/javah
30214      if test ! -x $JAVAH; then
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30216$as_echo "not found" >&6; }
30217        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30218$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30219        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30220      fi
30221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30222$as_echo "ok" >&6; }
30223
30224
30225    else
30226      # If it succeeded, then it was overridden by the user. We will use it
30227      # for the tool.
30228
30229      # First remove it from the list of overridden variables, so we can test
30230      # for unknown variables in the end.
30231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30232
30233      # Check if we try to supply an empty value
30234      if test "x$JAVAH" = x; then
30235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30236$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30238$as_echo_n "checking for JAVAH... " >&6; }
30239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30240$as_echo "disabled" >&6; }
30241      else
30242        # Check if the provided tool contains a complete path.
30243        tool_specified="$JAVAH"
30244        tool_basename="${tool_specified##*/}"
30245        if test "x$tool_basename" = "x$tool_specified"; then
30246          # A command without a complete path is provided, search $PATH.
30247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30248$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30249          # Extract the first word of "$tool_basename", so it can be a program name with args.
30250set dummy $tool_basename; ac_word=$2
30251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30252$as_echo_n "checking for $ac_word... " >&6; }
30253if ${ac_cv_path_JAVAH+:} false; then :
30254  $as_echo_n "(cached) " >&6
30255else
30256  case $JAVAH in
30257  [\\/]* | ?:[\\/]*)
30258  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30259  ;;
30260  *)
30261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30262for as_dir in $PATH
30263do
30264  IFS=$as_save_IFS
30265  test -z "$as_dir" && as_dir=.
30266    for ac_exec_ext in '' $ac_executable_extensions; do
30267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30268    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30270    break 2
30271  fi
30272done
30273  done
30274IFS=$as_save_IFS
30275
30276  ;;
30277esac
30278fi
30279JAVAH=$ac_cv_path_JAVAH
30280if test -n "$JAVAH"; then
30281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30282$as_echo "$JAVAH" >&6; }
30283else
30284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30285$as_echo "no" >&6; }
30286fi
30287
30288
30289          if test "x$JAVAH" = x; then
30290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30291          fi
30292        else
30293          # Otherwise we believe it is a complete path. Use it as it is.
30294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30295$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30297$as_echo_n "checking for JAVAH... " >&6; }
30298          if test ! -x "$tool_specified"; then
30299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30300$as_echo "not found" >&6; }
30301            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30302          fi
30303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30304$as_echo "$tool_specified" >&6; }
30305        fi
30306      fi
30307    fi
30308
30309  fi
30310
30311
30312
30313  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30314
30315  # Publish this variable in the help.
30316
30317
30318  if [ -z "${JAR+x}" ]; then
30319    # The variable is not set by user, try to locate tool using the code snippet
30320
30321      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30322$as_echo_n "checking for jar in Boot JDK... " >&6; }
30323      JAR=$BOOT_JDK/bin/jar
30324      if test ! -x $JAR; then
30325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30326$as_echo "not found" >&6; }
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30328$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30329        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30330      fi
30331      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30332$as_echo "ok" >&6; }
30333
30334
30335  else
30336    # The variable is set, but is it from the command line or the environment?
30337
30338    # Try to remove the string !JAR! from our list.
30339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30341      # If it failed, the variable was not from the command line. Ignore it,
30342      # but warn the user (except for BASH, which is always set by the calling BASH).
30343      if test "xJAR" != xBASH; then
30344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30345$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30346      fi
30347      # Try to locate tool using the code snippet
30348
30349      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30350$as_echo_n "checking for jar in Boot JDK... " >&6; }
30351      JAR=$BOOT_JDK/bin/jar
30352      if test ! -x $JAR; then
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30354$as_echo "not found" >&6; }
30355        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30356$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30357        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30358      fi
30359      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30360$as_echo "ok" >&6; }
30361
30362
30363    else
30364      # If it succeeded, then it was overridden by the user. We will use it
30365      # for the tool.
30366
30367      # First remove it from the list of overridden variables, so we can test
30368      # for unknown variables in the end.
30369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30370
30371      # Check if we try to supply an empty value
30372      if test "x$JAR" = x; then
30373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30374$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30376$as_echo_n "checking for JAR... " >&6; }
30377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30378$as_echo "disabled" >&6; }
30379      else
30380        # Check if the provided tool contains a complete path.
30381        tool_specified="$JAR"
30382        tool_basename="${tool_specified##*/}"
30383        if test "x$tool_basename" = "x$tool_specified"; then
30384          # A command without a complete path is provided, search $PATH.
30385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30386$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30387          # Extract the first word of "$tool_basename", so it can be a program name with args.
30388set dummy $tool_basename; ac_word=$2
30389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30390$as_echo_n "checking for $ac_word... " >&6; }
30391if ${ac_cv_path_JAR+:} false; then :
30392  $as_echo_n "(cached) " >&6
30393else
30394  case $JAR in
30395  [\\/]* | ?:[\\/]*)
30396  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30397  ;;
30398  *)
30399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30400for as_dir in $PATH
30401do
30402  IFS=$as_save_IFS
30403  test -z "$as_dir" && as_dir=.
30404    for ac_exec_ext in '' $ac_executable_extensions; do
30405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30406    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30408    break 2
30409  fi
30410done
30411  done
30412IFS=$as_save_IFS
30413
30414  ;;
30415esac
30416fi
30417JAR=$ac_cv_path_JAR
30418if test -n "$JAR"; then
30419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30420$as_echo "$JAR" >&6; }
30421else
30422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30423$as_echo "no" >&6; }
30424fi
30425
30426
30427          if test "x$JAR" = x; then
30428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30429          fi
30430        else
30431          # Otherwise we believe it is a complete path. Use it as it is.
30432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30433$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30435$as_echo_n "checking for JAR... " >&6; }
30436          if test ! -x "$tool_specified"; then
30437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30438$as_echo "not found" >&6; }
30439            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30440          fi
30441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30442$as_echo "$tool_specified" >&6; }
30443        fi
30444      fi
30445    fi
30446
30447  fi
30448
30449
30450
30451  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30452
30453  # Publish this variable in the help.
30454
30455
30456  if [ -z "${JARSIGNER+x}" ]; then
30457    # The variable is not set by user, try to locate tool using the code snippet
30458
30459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30460$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30461      JARSIGNER=$BOOT_JDK/bin/jarsigner
30462      if test ! -x $JARSIGNER; then
30463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30464$as_echo "not found" >&6; }
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30466$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30467        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30468      fi
30469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30470$as_echo "ok" >&6; }
30471
30472
30473  else
30474    # The variable is set, but is it from the command line or the environment?
30475
30476    # Try to remove the string !JARSIGNER! from our list.
30477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30479      # If it failed, the variable was not from the command line. Ignore it,
30480      # but warn the user (except for BASH, which is always set by the calling BASH).
30481      if test "xJARSIGNER" != xBASH; then
30482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30483$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30484      fi
30485      # Try to locate tool using the code snippet
30486
30487      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30488$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30489      JARSIGNER=$BOOT_JDK/bin/jarsigner
30490      if test ! -x $JARSIGNER; then
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30492$as_echo "not found" >&6; }
30493        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30494$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30495        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30496      fi
30497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30498$as_echo "ok" >&6; }
30499
30500
30501    else
30502      # If it succeeded, then it was overridden by the user. We will use it
30503      # for the tool.
30504
30505      # First remove it from the list of overridden variables, so we can test
30506      # for unknown variables in the end.
30507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30508
30509      # Check if we try to supply an empty value
30510      if test "x$JARSIGNER" = x; then
30511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30512$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30514$as_echo_n "checking for JARSIGNER... " >&6; }
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30516$as_echo "disabled" >&6; }
30517      else
30518        # Check if the provided tool contains a complete path.
30519        tool_specified="$JARSIGNER"
30520        tool_basename="${tool_specified##*/}"
30521        if test "x$tool_basename" = "x$tool_specified"; then
30522          # A command without a complete path is provided, search $PATH.
30523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30524$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30525          # Extract the first word of "$tool_basename", so it can be a program name with args.
30526set dummy $tool_basename; ac_word=$2
30527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30528$as_echo_n "checking for $ac_word... " >&6; }
30529if ${ac_cv_path_JARSIGNER+:} false; then :
30530  $as_echo_n "(cached) " >&6
30531else
30532  case $JARSIGNER in
30533  [\\/]* | ?:[\\/]*)
30534  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30535  ;;
30536  *)
30537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30538for as_dir in $PATH
30539do
30540  IFS=$as_save_IFS
30541  test -z "$as_dir" && as_dir=.
30542    for ac_exec_ext in '' $ac_executable_extensions; do
30543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30544    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30546    break 2
30547  fi
30548done
30549  done
30550IFS=$as_save_IFS
30551
30552  ;;
30553esac
30554fi
30555JARSIGNER=$ac_cv_path_JARSIGNER
30556if test -n "$JARSIGNER"; then
30557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30558$as_echo "$JARSIGNER" >&6; }
30559else
30560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30561$as_echo "no" >&6; }
30562fi
30563
30564
30565          if test "x$JARSIGNER" = x; then
30566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30567          fi
30568        else
30569          # Otherwise we believe it is a complete path. Use it as it is.
30570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30571$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30573$as_echo_n "checking for JARSIGNER... " >&6; }
30574          if test ! -x "$tool_specified"; then
30575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30576$as_echo "not found" >&6; }
30577            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30578          fi
30579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30580$as_echo "$tool_specified" >&6; }
30581        fi
30582      fi
30583    fi
30584
30585  fi
30586
30587
30588
30589  # Finally, set some other options...
30590
30591  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30592  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30593
30594
30595
30596  $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30597  $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30598  OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30599  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30600  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30601  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30602    dummy="$dummy --patch-module foo=bar"
30603    JVM_ARG_OK=true
30604  else
30605    $ECHO "Arg failed:" >&5
30606    $ECHO "$OUTPUT" >&5
30607    JVM_ARG_OK=false
30608  fi
30609
30610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30611$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30612  if test "x$JVM_ARG_OK" = "xtrue"; then
30613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30614$as_echo "yes" >&6; }
30615    BOOT_JDK_MODULAR="true"
30616  else
30617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30618$as_echo "no" >&6; }
30619    BOOT_JDK_MODULAR="false"
30620  fi
30621
30622
30623
30624
30625  # Check if the boot jdk is 32 or 64 bit
30626  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30627    BOOT_JDK_BITS="64"
30628  else
30629    BOOT_JDK_BITS="32"
30630  fi
30631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30632$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30634$as_echo "$BOOT_JDK_BITS" >&6; }
30635
30636
30637
30638
30639# Check whether --with-build-jdk was given.
30640if test "${with_build_jdk+set}" = set; then :
30641  withval=$with_build_jdk;
30642fi
30643
30644
30645  CREATE_BUILDJDK=false
30646  EXTERNAL_BUILDJDK=false
30647  BUILD_JDK_FOUND="no"
30648  if test "x$with_build_jdk" != "x"; then
30649
30650  if test "x$BUILD_JDK_FOUND" = xno; then
30651    # Execute the test
30652
30653       if test "x$with_build_jdk" != x; then
30654         BUILD_JDK=$with_build_jdk
30655         BUILD_JDK_FOUND=maybe
30656         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30657$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30658       fi
30659
30660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30661    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30662      # Do we have a bin/java?
30663      if test ! -x "$BUILD_JDK/bin/java"; then
30664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30665$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30666        BUILD_JDK_FOUND=no
30667      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30669$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30670        BUILD_JDK_FOUND=no
30671      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30672        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30673$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30674        BUILD_JDK_FOUND=no
30675      elif test ! -x "$BUILD_JDK/bin/javac"; then
30676        # Do we have a bin/javac?
30677        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30678$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30680$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30681        BUILD_JDK_FOUND=no
30682      else
30683        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30684        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30685
30686        # Extra M4 quote needed to protect [] in grep expression.
30687        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30688        if test "x$FOUND_CORRECT_VERSION" = x; then
30689          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30690$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30691          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30692$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30693          BUILD_JDK_FOUND=no
30694        else
30695          # We're done!
30696          BUILD_JDK_FOUND=yes
30697
30698  # Only process if variable expands to non-empty
30699
30700  if test "x$BUILD_JDK" != x; then
30701    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30702
30703  # Input might be given as Windows format, start by converting to
30704  # unix format.
30705  path="$BUILD_JDK"
30706  new_path=`$CYGPATH -u "$path"`
30707
30708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30711  # "foo.exe" is OK but "foo" is an error.
30712  #
30713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30714  # It is also a way to make sure we got the proper file name for the real test later on.
30715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30716  if test "x$test_shortpath" = x; then
30717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30718$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30719    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30720  fi
30721
30722  # Call helper function which possibly converts this using DOS-style short mode.
30723  # If so, the updated path is stored in $new_path.
30724
30725  input_path="$new_path"
30726  # Check if we need to convert this using DOS-style short mode. If the path
30727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30728  # take no chances and rewrite it.
30729  # Note: m4 eats our [], so we need to use [ and ] instead.
30730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30731  if test "x$has_forbidden_chars" != x; then
30732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30736      # Going to short mode and back again did indeed matter. Since short mode is
30737      # case insensitive, let's make it lowercase to improve readability.
30738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30739      # Now convert it back to Unix-style (cygpath)
30740      input_path=`$CYGPATH -u "$shortmode_path"`
30741      new_path="$input_path"
30742    fi
30743  fi
30744
30745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30746  if test "x$test_cygdrive_prefix" = x; then
30747    # As a simple fix, exclude /usr/bin since it's not a real path.
30748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30750      # a path prefixed by /cygdrive for fixpath to work.
30751      new_path="$CYGWIN_ROOT_PATH$input_path"
30752    fi
30753  fi
30754
30755
30756  if test "x$path" != "x$new_path"; then
30757    BUILD_JDK="$new_path"
30758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30759$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30760  fi
30761
30762    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30763
30764  path="$BUILD_JDK"
30765  has_colon=`$ECHO $path | $GREP ^.:`
30766  new_path="$path"
30767  if test "x$has_colon" = x; then
30768    # Not in mixed or Windows style, start by that.
30769    new_path=`cmd //c echo $path`
30770  fi
30771
30772
30773  input_path="$new_path"
30774  # Check if we need to convert this using DOS-style short mode. If the path
30775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30776  # take no chances and rewrite it.
30777  # Note: m4 eats our [], so we need to use [ and ] instead.
30778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30779  if test "x$has_forbidden_chars" != x; then
30780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30782  fi
30783
30784
30785  windows_path="$new_path"
30786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30787    unix_path=`$CYGPATH -u "$windows_path"`
30788    new_path="$unix_path"
30789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30791    new_path="$unix_path"
30792  fi
30793
30794  if test "x$path" != "x$new_path"; then
30795    BUILD_JDK="$new_path"
30796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30797$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30798  fi
30799
30800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30802
30803    else
30804      # We're on a unix platform. Hooray! :)
30805      path="$BUILD_JDK"
30806      has_space=`$ECHO "$path" | $GREP " "`
30807      if test "x$has_space" != x; then
30808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30809$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30810        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30811      fi
30812
30813      # Use eval to expand a potential ~
30814      eval path="$path"
30815      if test ! -f "$path" && test ! -d "$path"; then
30816        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30817      fi
30818
30819      if test -d "$path"; then
30820        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30821      else
30822        dir="`$DIRNAME "$path"`"
30823        base="`$BASENAME "$path"`"
30824        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30825      fi
30826    fi
30827  fi
30828
30829          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30830$as_echo_n "checking for Build JDK... " >&6; }
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30832$as_echo "$BUILD_JDK" >&6; }
30833          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30834$as_echo_n "checking Build JDK version... " >&6; }
30835          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30836          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30837$as_echo "$BUILD_JDK_VERSION" >&6; }
30838        fi # end check jdk version
30839      fi # end check java
30840    fi # end check build jdk found
30841  fi
30842
30843    EXTERNAL_BUILDJDK=true
30844  else
30845    if test "x$COMPILE_TYPE" = "xcross"; then
30846      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30847      BUILD_JDK_FOUND=yes
30848      CREATE_BUILDJDK=true
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30850$as_echo_n "checking for Build JDK... " >&6; }
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30852$as_echo "yes, will build it for the host platform" >&6; }
30853    else
30854      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30855      BUILD_JDK_FOUND=yes
30856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30857$as_echo_n "checking for Build JDK... " >&6; }
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30859$as_echo "yes, will use output dir" >&6; }
30860    fi
30861  fi
30862
30863  JMOD="$BUILD_JDK/bin/jmod"
30864  JLINK="$BUILD_JDK/bin/jlink"
30865
30866
30867
30868  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30870$as_echo_n "checking for Build JDK... " >&6; }
30871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30872$as_echo "no" >&6; }
30873    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30874  fi
30875
30876
30877
30878
30879
30880
30881###############################################################################
30882#
30883# Configure the sources to use. We can add or override individual directories.
30884#
30885###############################################################################
30886
30887
30888  # Where are the sources.
30889  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30890  CORBA_TOPDIR="$SRC_ROOT/corba"
30891  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30892  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30893  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30894  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30895  JDK_TOPDIR="$SRC_ROOT/jdk"
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905  # This feature is no longer supported.
30906
30907
30908
30909# Check whether --with-add-source-root was given.
30910if test "${with_add_source_root+set}" = set; then :
30911  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
30912$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30913fi
30914
30915
30916
30917
30918# Check whether --with-override-source-root was given.
30919if test "${with_override_source_root+set}" = set; then :
30920  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
30921$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30922fi
30923
30924
30925
30926
30927# Check whether --with-adds-and-overrides was given.
30928if test "${with_adds_and_overrides+set}" = set; then :
30929  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
30930$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30931fi
30932
30933
30934
30935
30936# Check whether --with-override-langtools was given.
30937if test "${with_override_langtools+set}" = set; then :
30938  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30939$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30940fi
30941
30942
30943
30944
30945# Check whether --with-override-corba was given.
30946if test "${with_override_corba+set}" = set; then :
30947  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30948$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30949fi
30950
30951
30952
30953
30954# Check whether --with-override-jaxp was given.
30955if test "${with_override_jaxp+set}" = set; then :
30956  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30957$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30958fi
30959
30960
30961
30962
30963# Check whether --with-override-jaxws was given.
30964if test "${with_override_jaxws+set}" = set; then :
30965  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30966$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30967fi
30968
30969
30970
30971
30972# Check whether --with-override-hotspot was given.
30973if test "${with_override_hotspot+set}" = set; then :
30974  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30975$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30976fi
30977
30978
30979
30980
30981# Check whether --with-override-nashorn was given.
30982if test "${with_override_nashorn+set}" = set; then :
30983  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30984$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30985fi
30986
30987
30988
30989
30990# Check whether --with-override-jdk was given.
30991if test "${with_override_jdk+set}" = set; then :
30992  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30993$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30994fi
30995
30996
30997
30998
30999  BUILD_OUTPUT="$OUTPUT_ROOT"
31000
31001
31002  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31003  BUILD_HOTSPOT=true
31004
31005
31006
31007# Check whether --with-import-hotspot was given.
31008if test "${with_import_hotspot+set}" = set; then :
31009  withval=$with_import_hotspot;
31010fi
31011
31012  if test "x$with_import_hotspot" != x; then
31013    CURDIR="$PWD"
31014    cd "$with_import_hotspot"
31015    HOTSPOT_DIST="`pwd`"
31016    cd "$CURDIR"
31017    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31018      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31019    fi
31020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31021$as_echo_n "checking if hotspot should be imported... " >&6; }
31022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31023$as_echo "yes from $HOTSPOT_DIST" >&6; }
31024    BUILD_HOTSPOT=false
31025  fi
31026
31027  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31028
31029
31030
31031
31032# Check whether --with-import-modules was given.
31033if test "${with_import_modules+set}" = set; then :
31034  withval=$with_import_modules;
31035fi
31036
31037
31038  if test "x$with_import_modules" != x \
31039      && test "x$with_import_modules" != "xno"; then
31040    if test -d "$with_import_modules"; then
31041      IMPORT_MODULES_TOPDIR="$with_import_modules"
31042
31043  # Only process if variable expands to non-empty
31044
31045  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31046    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31047
31048  # Input might be given as Windows format, start by converting to
31049  # unix format.
31050  path="$IMPORT_MODULES_TOPDIR"
31051  new_path=`$CYGPATH -u "$path"`
31052
31053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31056  # "foo.exe" is OK but "foo" is an error.
31057  #
31058  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31059  # It is also a way to make sure we got the proper file name for the real test later on.
31060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31061  if test "x$test_shortpath" = x; then
31062    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31063$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31064    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31065  fi
31066
31067  # Call helper function which possibly converts this using DOS-style short mode.
31068  # If so, the updated path is stored in $new_path.
31069
31070  input_path="$new_path"
31071  # Check if we need to convert this using DOS-style short mode. If the path
31072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31073  # take no chances and rewrite it.
31074  # Note: m4 eats our [], so we need to use [ and ] instead.
31075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31076  if test "x$has_forbidden_chars" != x; then
31077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31081      # Going to short mode and back again did indeed matter. Since short mode is
31082      # case insensitive, let's make it lowercase to improve readability.
31083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31084      # Now convert it back to Unix-style (cygpath)
31085      input_path=`$CYGPATH -u "$shortmode_path"`
31086      new_path="$input_path"
31087    fi
31088  fi
31089
31090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31091  if test "x$test_cygdrive_prefix" = x; then
31092    # As a simple fix, exclude /usr/bin since it's not a real path.
31093    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31095      # a path prefixed by /cygdrive for fixpath to work.
31096      new_path="$CYGWIN_ROOT_PATH$input_path"
31097    fi
31098  fi
31099
31100
31101  if test "x$path" != "x$new_path"; then
31102    IMPORT_MODULES_TOPDIR="$new_path"
31103    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31104$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31105  fi
31106
31107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31108
31109  path="$IMPORT_MODULES_TOPDIR"
31110  has_colon=`$ECHO $path | $GREP ^.:`
31111  new_path="$path"
31112  if test "x$has_colon" = x; then
31113    # Not in mixed or Windows style, start by that.
31114    new_path=`cmd //c echo $path`
31115  fi
31116
31117
31118  input_path="$new_path"
31119  # Check if we need to convert this using DOS-style short mode. If the path
31120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31121  # take no chances and rewrite it.
31122  # Note: m4 eats our [], so we need to use [ and ] instead.
31123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31124  if test "x$has_forbidden_chars" != x; then
31125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31126    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31127  fi
31128
31129
31130  windows_path="$new_path"
31131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31132    unix_path=`$CYGPATH -u "$windows_path"`
31133    new_path="$unix_path"
31134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31136    new_path="$unix_path"
31137  fi
31138
31139  if test "x$path" != "x$new_path"; then
31140    IMPORT_MODULES_TOPDIR="$new_path"
31141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31142$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31143  fi
31144
31145  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31146  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31147
31148    else
31149      # We're on a unix platform. Hooray! :)
31150      path="$IMPORT_MODULES_TOPDIR"
31151      has_space=`$ECHO "$path" | $GREP " "`
31152      if test "x$has_space" != x; then
31153        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31154$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31155        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31156      fi
31157
31158      # Use eval to expand a potential ~
31159      eval path="$path"
31160      if test ! -f "$path" && test ! -d "$path"; then
31161        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31162      fi
31163
31164      if test -d "$path"; then
31165        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31166      else
31167        dir="`$DIRNAME "$path"`"
31168        base="`$BASENAME "$path"`"
31169        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31170      fi
31171    fi
31172  fi
31173
31174    elif test -e "$with_import_modules"; then
31175      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31176      $RM -rf "$IMPORT_MODULES_TOPDIR"
31177      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31178      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31179        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31180      fi
31181    else
31182      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31183    fi
31184  fi
31185
31186  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31187    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31188  fi
31189  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31190    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31191  fi
31192  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31193    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31194  fi
31195  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31196    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31197  fi
31198  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31199    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31200  fi
31201  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31202    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31203  fi
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213###############################################################################
31214#
31215# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31216# native code.
31217#
31218###############################################################################
31219
31220# See if we are doing a complete static build or not
31221
31222  # Check whether --enable-static-build was given.
31223if test "${enable_static_build+set}" = set; then :
31224  enableval=$enable_static_build;
31225fi
31226
31227  STATIC_BUILD=false
31228  if test "x$enable_static_build" = "xyes"; then
31229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31230$as_echo_n "checking if static build is enabled... " >&6; }
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31232$as_echo "yes" >&6; }
31233    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31234      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31235    fi
31236    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31237    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31238    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31239    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31240    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31241    STATIC_BUILD=true
31242  elif test "x$enable_static_build" = "xno"; then
31243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31244$as_echo_n "checking if static build is enabled... " >&6; }
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31246$as_echo "no" >&6; }
31247  elif test "x$enable_static_build" != "x"; then
31248    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31249  fi
31250
31251
31252
31253
31254# First determine the toolchain type (compiler family)
31255
31256
31257# Check whether --with-toolchain-type was given.
31258if test "${with_toolchain_type+set}" = set; then :
31259  withval=$with_toolchain_type;
31260fi
31261
31262
31263  # Use indirect variable referencing
31264  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31265  VALID_TOOLCHAINS=${!toolchain_var_name}
31266
31267  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31268    if test -n "$XCODEBUILD"; then
31269      # On Mac OS X, default toolchain to clang after Xcode 5
31270      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31271      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31272      if test $? -ne 0; then
31273        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31274      fi
31275      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31276          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31277          $CUT -f 1 -d .`
31278      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31279$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31280      if test $XCODE_MAJOR_VERSION -ge 5; then
31281          DEFAULT_TOOLCHAIN="clang"
31282      else
31283          DEFAULT_TOOLCHAIN="gcc"
31284      fi
31285    else
31286      # If Xcode is not installed, but the command line tools are
31287      # then we can't run xcodebuild. On these systems we should
31288      # default to clang
31289      DEFAULT_TOOLCHAIN="clang"
31290    fi
31291  else
31292    # First toolchain type in the list is the default
31293    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31294  fi
31295
31296  if test "x$with_toolchain_type" = xlist; then
31297    # List all toolchains
31298    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31299$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31300    for toolchain in $VALID_TOOLCHAINS; do
31301      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31302      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31303      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31304    done
31305
31306    exit 0
31307  elif test "x$with_toolchain_type" != x; then
31308    # User override; check that it is valid
31309    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31310      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31311$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31312      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31313$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31314      as_fn_error $? "Cannot continue." "$LINENO" 5
31315    fi
31316    TOOLCHAIN_TYPE=$with_toolchain_type
31317  else
31318    # No flag given, use default
31319    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31320  fi
31321
31322
31323  TOOLCHAIN_CC_BINARY_clang="clang"
31324  TOOLCHAIN_CC_BINARY_gcc="gcc"
31325  TOOLCHAIN_CC_BINARY_microsoft="cl"
31326  TOOLCHAIN_CC_BINARY_solstudio="cc"
31327  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31328
31329  TOOLCHAIN_CXX_BINARY_clang="clang++"
31330  TOOLCHAIN_CXX_BINARY_gcc="g++"
31331  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31332  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31333  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31334
31335  # Use indirect variable referencing
31336  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31337  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31338  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31340  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31344
31345
31346  # Define filename patterns
31347  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31348    LIBRARY_PREFIX=
31349    SHARED_LIBRARY_SUFFIX='.dll'
31350    STATIC_LIBRARY_SUFFIX='.lib'
31351    SHARED_LIBRARY='$1.dll'
31352    STATIC_LIBRARY='$1.lib'
31353    OBJ_SUFFIX='.obj'
31354    EXE_SUFFIX='.exe'
31355  else
31356    LIBRARY_PREFIX=lib
31357    SHARED_LIBRARY_SUFFIX='.so'
31358    STATIC_LIBRARY_SUFFIX='.a'
31359    SHARED_LIBRARY='lib$1.so'
31360    STATIC_LIBRARY='lib$1.a'
31361    OBJ_SUFFIX='.o'
31362    EXE_SUFFIX=''
31363    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31364      # For full static builds, we're overloading the SHARED_LIBRARY
31365      # variables in order to limit the amount of changes required.
31366      # It would be better to remove SHARED and just use LIBRARY and
31367      # LIBRARY_SUFFIX for libraries that can be built either
31368      # shared or static and use STATIC_* for libraries that are
31369      # always built statically.
31370      if test "x$STATIC_BUILD" = xtrue; then
31371        SHARED_LIBRARY='lib$1.a'
31372        SHARED_LIBRARY_SUFFIX='.a'
31373      else
31374        SHARED_LIBRARY='lib$1.dylib'
31375        SHARED_LIBRARY_SUFFIX='.dylib'
31376      fi
31377    fi
31378  fi
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31390    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31391$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31392  else
31393    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31394$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31395  fi
31396
31397
31398# User supplied flags should be used when configure detects compilers
31399
31400  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31402$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31403  fi
31404
31405  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31406    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31407$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31408  fi
31409
31410  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31411    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31412$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31413  fi
31414
31415
31416# Check whether --with-extra-cflags was given.
31417if test "${with_extra_cflags+set}" = set; then :
31418  withval=$with_extra_cflags;
31419fi
31420
31421
31422
31423# Check whether --with-extra-cxxflags was given.
31424if test "${with_extra_cxxflags+set}" = set; then :
31425  withval=$with_extra_cxxflags;
31426fi
31427
31428
31429
31430# Check whether --with-extra-ldflags was given.
31431if test "${with_extra_ldflags+set}" = set; then :
31432  withval=$with_extra_ldflags;
31433fi
31434
31435
31436  EXTRA_CFLAGS="$with_extra_cflags"
31437  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31438  EXTRA_LDFLAGS="$with_extra_ldflags"
31439
31440  # Hotspot needs these set in their legacy form
31441  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31442  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31443  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453  # The global CFLAGS and LDLAGS variables are used by configure tests and
31454  # should include the extra parameters
31455  CFLAGS="$EXTRA_CFLAGS"
31456  CXXFLAGS="$EXTRA_CXXFLAGS"
31457  LDFLAGS="$EXTRA_LDFLAGS"
31458  CPPFLAGS=""
31459
31460# The sysroot cflags are needed for configure to be able to run the compilers
31461
31462  if test "x$SYSROOT" != "x"; then
31463    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31464      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31465        # Solaris Studio does not have a concept of sysroot. Instead we must
31466        # make sure the default include and lib dirs are appended to each
31467        # compile and link command line. Must also add -I-xbuiltin to enable
31468        # inlining of system functions and intrinsics.
31469        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31470        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31471            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31472      fi
31473    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31474      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31475      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31476    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31477      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31478      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31479    fi
31480    # Propagate the sysroot args to hotspot
31481    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31482    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31483    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31484    # The global CFLAGS and LDFLAGS variables need these for configure to function
31485    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31486    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31487    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31488    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31489  fi
31490
31491  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31492    # We also need -iframework<path>/System/Library/Frameworks
31493    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31494    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31495    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31496    # set this here so it doesn't have to be peppered throughout the forest
31497    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31498    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31499  fi
31500
31501
31502
31503
31504
31505# Then detect the actual binaries needed
31506
31507  # FIXME: Is this needed?
31508  ac_ext=cpp
31509ac_cpp='$CXXCPP $CPPFLAGS'
31510ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31511ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31512ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31513
31514
31515  # Store the CFLAGS etc passed to the configure script.
31516  ORG_CFLAGS="$CFLAGS"
31517  ORG_CXXFLAGS="$CXXFLAGS"
31518
31519  # autoconf magic only relies on PATH, so update it if tools dir is specified
31520  OLD_PATH="$PATH"
31521
31522  # On Windows, we need to detect the visual studio installation first.
31523  # This will change the PATH, but we need to keep that new PATH even
31524  # after toolchain detection is done, since the compiler (on x86) uses
31525  # it for DLL resolution in runtime.
31526  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31527      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31528
31529  # Store path to cygwin link.exe to help excluding it when searching for
31530  # VS linker. This must be done before changing the PATH when looking for VS.
31531  # Extract the first word of "link", so it can be a program name with args.
31532set dummy link; ac_word=$2
31533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31534$as_echo_n "checking for $ac_word... " >&6; }
31535if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31536  $as_echo_n "(cached) " >&6
31537else
31538  case $CYGWIN_LINK in
31539  [\\/]* | ?:[\\/]*)
31540  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31541  ;;
31542  *)
31543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31544for as_dir in $PATH
31545do
31546  IFS=$as_save_IFS
31547  test -z "$as_dir" && as_dir=.
31548    for ac_exec_ext in '' $ac_executable_extensions; do
31549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31550    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31552    break 2
31553  fi
31554done
31555  done
31556IFS=$as_save_IFS
31557
31558  ;;
31559esac
31560fi
31561CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31562if test -n "$CYGWIN_LINK"; then
31563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31564$as_echo "$CYGWIN_LINK" >&6; }
31565else
31566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31567$as_echo "no" >&6; }
31568fi
31569
31570
31571  if test "x$CYGWIN_LINK" != x; then
31572    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31573$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31574    "$CYGWIN_LINK" --version > /dev/null
31575    if test $? -eq 0 ; then
31576      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31577$as_echo "yes" >&6; }
31578    else
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31580$as_echo "no" >&6; }
31581      # This might be the VS linker. Don't exclude it later on.
31582      CYGWIN_LINK=""
31583    fi
31584  fi
31585
31586  # First-hand choice is to locate and run the vsvars bat file.
31587
31588
31589# Check whether --with-toolchain-version was given.
31590if test "${with_toolchain_version+set}" = set; then :
31591  withval=$with_toolchain_version;
31592fi
31593
31594
31595  if test "x$with_toolchain_version" = xlist; then
31596    # List all toolchains
31597    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31598$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31599    for version in $VALID_VS_VERSIONS; do
31600      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31601      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31602    done
31603
31604    exit 0
31605  elif test "x$DEVKIT_VS_VERSION" != x; then
31606    VS_VERSION=$DEVKIT_VS_VERSION
31607    TOOLCHAIN_VERSION=$VS_VERSION
31608    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31609    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31610    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31611    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31612    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31613    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31614
31615    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31616    # can still be exported as INCLUDE for compiler invocations without
31617    # SYSROOT_CFLAGS
31618    OLDIFS="$IFS"
31619    IFS=";"
31620    for i in $DEVKIT_VS_INCLUDE; do
31621      ipath=$i
31622
31623  unix_path="$ipath"
31624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31625    windows_path=`$CYGPATH -m "$unix_path"`
31626    ipath="$windows_path"
31627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31628    windows_path=`cmd //c echo $unix_path`
31629    ipath="$windows_path"
31630  fi
31631
31632      VS_INCLUDE="$VS_INCLUDE;$ipath"
31633    done
31634    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31635    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31636    for i in $DEVKIT_VS_LIB; do
31637      libpath=$i
31638
31639  unix_path="$libpath"
31640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31641    windows_path=`$CYGPATH -m "$unix_path"`
31642    libpath="$windows_path"
31643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31644    windows_path=`cmd //c echo $unix_path`
31645    libpath="$windows_path"
31646  fi
31647
31648      VS_LIB="$VS_LIB;$libpath"
31649    done
31650    IFS="$OLDIFS"
31651
31652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31653$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31654
31655  elif test "x$with_toolchain_version" != x; then
31656    # User override; check that it is valid
31657    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31658      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31659$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31660      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31661$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31662      as_fn_error $? "Cannot continue." "$LINENO" 5
31663    fi
31664    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31665  else
31666    # No flag given, use default
31667    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31668  fi
31669
31670  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31671
31672  VS_VERSION="$VS_VERSION"
31673  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31674  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31675  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31676  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31677
31678  # When using --with-tools-dir, assume it points to the correct and default
31679  # version of Visual Studio or that --with-toolchain-version was also set.
31680  if test "x$with_tools_dir" != x; then
31681
31682  if test "x$VS_ENV_CMD" = x; then
31683    VS_VERSION="${VS_VERSION}"
31684    VS_BASE="$with_tools_dir/../.."
31685    METHOD="--with-tools-dir"
31686
31687    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31688      VCVARSFILE="vc/bin/vcvars32.bat"
31689    else
31690      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31691    fi
31692
31693
31694  windows_path="$VS_BASE"
31695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31696    unix_path=`$CYGPATH -u "$windows_path"`
31697    VS_BASE="$unix_path"
31698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31700    VS_BASE="$unix_path"
31701  fi
31702
31703    if test -d "$VS_BASE"; then
31704      if test -f "$VS_BASE/$VCVARSFILE"; then
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31706$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31707        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31708        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31709        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31710        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31711      else
31712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31713$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31714        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31715$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31716      fi
31717    fi
31718  fi
31719
31720
31721  if test "x$VS_ENV_CMD" = x; then
31722    VS_VERSION="${VS_VERSION}"
31723    VS_BASE="$with_tools_dir/../../.."
31724    METHOD="--with-tools-dir"
31725
31726    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31727      VCVARSFILE="vc/bin/vcvars32.bat"
31728    else
31729      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31730    fi
31731
31732
31733  windows_path="$VS_BASE"
31734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31735    unix_path=`$CYGPATH -u "$windows_path"`
31736    VS_BASE="$unix_path"
31737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31739    VS_BASE="$unix_path"
31740  fi
31741
31742    if test -d "$VS_BASE"; then
31743      if test -f "$VS_BASE/$VCVARSFILE"; then
31744        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31745$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31746        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31747        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31748        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31749        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31750      else
31751        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31752$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31753        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31754$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31755      fi
31756    fi
31757  fi
31758
31759    if test "x$VS_ENV_CMD" = x; then
31760      # Having specified an argument which is incorrect will produce an instant failure;
31761      # we should not go on looking
31762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31763$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31765$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31766      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31767$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31768      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31769    fi
31770  fi
31771
31772  VS_ENV_CMD=""
31773  VS_ENV_ARGS=""
31774
31775  if test "x$VS_COMNTOOLS" != x; then
31776
31777  if test "x$VS_ENV_CMD" = x; then
31778    VS_VERSION="${VS_VERSION}"
31779    VS_BASE="$VS_COMNTOOLS/../.."
31780    METHOD="$VS_COMNTOOLS_VAR variable"
31781
31782    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31783      VCVARSFILE="vc/bin/vcvars32.bat"
31784    else
31785      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31786    fi
31787
31788
31789  windows_path="$VS_BASE"
31790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31791    unix_path=`$CYGPATH -u "$windows_path"`
31792    VS_BASE="$unix_path"
31793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31795    VS_BASE="$unix_path"
31796  fi
31797
31798    if test -d "$VS_BASE"; then
31799      if test -f "$VS_BASE/$VCVARSFILE"; then
31800        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31801$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31802        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31803        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31804        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31805        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31806      else
31807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31808$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31809        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31810$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31811      fi
31812    fi
31813  fi
31814
31815  fi
31816  if test "x$PROGRAMFILES" != x; then
31817
31818  if test "x$VS_ENV_CMD" = x; then
31819    VS_VERSION="${VS_VERSION}"
31820    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31821    METHOD="well-known name"
31822
31823    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31824      VCVARSFILE="vc/bin/vcvars32.bat"
31825    else
31826      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31827    fi
31828
31829
31830  windows_path="$VS_BASE"
31831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31832    unix_path=`$CYGPATH -u "$windows_path"`
31833    VS_BASE="$unix_path"
31834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31836    VS_BASE="$unix_path"
31837  fi
31838
31839    if test -d "$VS_BASE"; then
31840      if test -f "$VS_BASE/$VCVARSFILE"; then
31841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31842$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31843        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31844        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31845        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31846        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31847      else
31848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31849$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31850        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31851$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31852      fi
31853    fi
31854  fi
31855
31856  fi
31857  # Work around the insanely named ProgramFiles(x86) env variable
31858  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31859  if test "x$PROGRAMFILES_X86" != x; then
31860
31861  if test "x$VS_ENV_CMD" = x; then
31862    VS_VERSION="${VS_VERSION}"
31863    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31864    METHOD="well-known name"
31865
31866    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31867      VCVARSFILE="vc/bin/vcvars32.bat"
31868    else
31869      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31870    fi
31871
31872
31873  windows_path="$VS_BASE"
31874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31875    unix_path=`$CYGPATH -u "$windows_path"`
31876    VS_BASE="$unix_path"
31877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31879    VS_BASE="$unix_path"
31880  fi
31881
31882    if test -d "$VS_BASE"; then
31883      if test -f "$VS_BASE/$VCVARSFILE"; then
31884        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31885$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31886        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31887        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31888        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31889        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31890      else
31891        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31892$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31893        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31894$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31895      fi
31896    fi
31897  fi
31898
31899  fi
31900
31901  if test "x$VS_ENV_CMD" = x; then
31902    VS_VERSION="${VS_VERSION}"
31903    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31904    METHOD="well-known name"
31905
31906    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31907      VCVARSFILE="vc/bin/vcvars32.bat"
31908    else
31909      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31910    fi
31911
31912
31913  windows_path="$VS_BASE"
31914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31915    unix_path=`$CYGPATH -u "$windows_path"`
31916    VS_BASE="$unix_path"
31917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31919    VS_BASE="$unix_path"
31920  fi
31921
31922    if test -d "$VS_BASE"; then
31923      if test -f "$VS_BASE/$VCVARSFILE"; then
31924        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31925$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31926        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31927        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31928        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31929        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31930      else
31931        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31932$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31933        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31934$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31935      fi
31936    fi
31937  fi
31938
31939
31940  if test "x$VS_ENV_CMD" = x; then
31941    VS_VERSION="${VS_VERSION}"
31942    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31943    METHOD="well-known name"
31944
31945    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31946      VCVARSFILE="vc/bin/vcvars32.bat"
31947    else
31948      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31949    fi
31950
31951
31952  windows_path="$VS_BASE"
31953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31954    unix_path=`$CYGPATH -u "$windows_path"`
31955    VS_BASE="$unix_path"
31956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31958    VS_BASE="$unix_path"
31959  fi
31960
31961    if test -d "$VS_BASE"; then
31962      if test -f "$VS_BASE/$VCVARSFILE"; then
31963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31964$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31965        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31966        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31967        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31968        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31969      else
31970        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31971$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31972        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31973$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31974      fi
31975    fi
31976  fi
31977
31978
31979  if test "x$SDK_INSTALL_DIR" != x; then
31980    if test "x$ProgramW6432" != x; then
31981
31982  if test "x$VS_ENV_CMD" = x; then
31983    VS_VERSION="${VS_VERSION}"
31984    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31985    METHOD="well-known name"
31986
31987  windows_path="$WIN_SDK_BASE"
31988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989    unix_path=`$CYGPATH -u "$windows_path"`
31990    WIN_SDK_BASE="$unix_path"
31991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31993    WIN_SDK_BASE="$unix_path"
31994  fi
31995
31996    if test -d "$WIN_SDK_BASE"; then
31997      # There have been cases of partial or broken SDK installations. A missing
31998      # lib dir is not going to work.
31999      if test ! -d "$WIN_SDK_BASE/lib"; then
32000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32001$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32003$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32004      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32005        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32006$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32007        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32008        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32009          VS_ENV_ARGS="/x86"
32010        else
32011          VS_ENV_ARGS="/x64"
32012        fi
32013        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32014        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32015        # TODO: improve detection for other versions of SDK
32016        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32017      else
32018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32019$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32020        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32021$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32022      fi
32023    fi
32024  fi
32025
32026    fi
32027    if test "x$PROGRAMW6432" != x; then
32028
32029  if test "x$VS_ENV_CMD" = x; then
32030    VS_VERSION="${VS_VERSION}"
32031    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32032    METHOD="well-known name"
32033
32034  windows_path="$WIN_SDK_BASE"
32035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32036    unix_path=`$CYGPATH -u "$windows_path"`
32037    WIN_SDK_BASE="$unix_path"
32038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32040    WIN_SDK_BASE="$unix_path"
32041  fi
32042
32043    if test -d "$WIN_SDK_BASE"; then
32044      # There have been cases of partial or broken SDK installations. A missing
32045      # lib dir is not going to work.
32046      if test ! -d "$WIN_SDK_BASE/lib"; then
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32048$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32049        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32050$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32051      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32052        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32053$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32054        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32055        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32056          VS_ENV_ARGS="/x86"
32057        else
32058          VS_ENV_ARGS="/x64"
32059        fi
32060        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32061        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32062        # TODO: improve detection for other versions of SDK
32063        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32064      else
32065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32066$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32067        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32068$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32069      fi
32070    fi
32071  fi
32072
32073    fi
32074    if test "x$PROGRAMFILES" != x; then
32075
32076  if test "x$VS_ENV_CMD" = x; then
32077    VS_VERSION="${VS_VERSION}"
32078    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32079    METHOD="well-known name"
32080
32081  windows_path="$WIN_SDK_BASE"
32082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32083    unix_path=`$CYGPATH -u "$windows_path"`
32084    WIN_SDK_BASE="$unix_path"
32085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32087    WIN_SDK_BASE="$unix_path"
32088  fi
32089
32090    if test -d "$WIN_SDK_BASE"; then
32091      # There have been cases of partial or broken SDK installations. A missing
32092      # lib dir is not going to work.
32093      if test ! -d "$WIN_SDK_BASE/lib"; then
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32095$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32096        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32097$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32098      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32100$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32101        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32102        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32103          VS_ENV_ARGS="/x86"
32104        else
32105          VS_ENV_ARGS="/x64"
32106        fi
32107        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32108        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32109        # TODO: improve detection for other versions of SDK
32110        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32111      else
32112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32113$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32114        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32115$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32116      fi
32117    fi
32118  fi
32119
32120    fi
32121
32122  if test "x$VS_ENV_CMD" = x; then
32123    VS_VERSION="${VS_VERSION}"
32124    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32125    METHOD="well-known name"
32126
32127  windows_path="$WIN_SDK_BASE"
32128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32129    unix_path=`$CYGPATH -u "$windows_path"`
32130    WIN_SDK_BASE="$unix_path"
32131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32133    WIN_SDK_BASE="$unix_path"
32134  fi
32135
32136    if test -d "$WIN_SDK_BASE"; then
32137      # There have been cases of partial or broken SDK installations. A missing
32138      # lib dir is not going to work.
32139      if test ! -d "$WIN_SDK_BASE/lib"; then
32140        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32141$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32142        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32143$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32144      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32146$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32147        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32148        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32149          VS_ENV_ARGS="/x86"
32150        else
32151          VS_ENV_ARGS="/x64"
32152        fi
32153        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32154        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32155        # TODO: improve detection for other versions of SDK
32156        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32157      else
32158        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32159$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32160        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32161$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32162      fi
32163    fi
32164  fi
32165
32166
32167  if test "x$VS_ENV_CMD" = x; then
32168    VS_VERSION="${VS_VERSION}"
32169    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32170    METHOD="well-known name"
32171
32172  windows_path="$WIN_SDK_BASE"
32173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32174    unix_path=`$CYGPATH -u "$windows_path"`
32175    WIN_SDK_BASE="$unix_path"
32176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32178    WIN_SDK_BASE="$unix_path"
32179  fi
32180
32181    if test -d "$WIN_SDK_BASE"; then
32182      # There have been cases of partial or broken SDK installations. A missing
32183      # lib dir is not going to work.
32184      if test ! -d "$WIN_SDK_BASE/lib"; then
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32188$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32189      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32191$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32192        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32193        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32194          VS_ENV_ARGS="/x86"
32195        else
32196          VS_ENV_ARGS="/x64"
32197        fi
32198        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32199        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32200        # TODO: improve detection for other versions of SDK
32201        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32202      else
32203        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32204$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32205        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32206$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32207      fi
32208    fi
32209  fi
32210
32211  fi
32212
32213    if test "x$VS_ENV_CMD" != x; then
32214      TOOLCHAIN_VERSION=$VS_VERSION
32215      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32216      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32217      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32218      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32219      # The rest of the variables are already evaled while probing
32220      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32221$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32222      break
32223    fi
32224  done
32225
32226
32227  # If we have a devkit, skip all of the below.
32228  if test "x$DEVKIT_VS_VERSION" = x; then
32229    if test "x$VS_ENV_CMD" != x; then
32230      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32231
32232  # Only process if variable expands to non-empty
32233
32234  if test "x$VS_ENV_CMD" != x; then
32235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32236
32237  # First separate the path from the arguments. This will split at the first
32238  # space.
32239  complete="$VS_ENV_CMD"
32240  path="${complete%% *}"
32241  tmp="$complete EOL"
32242  arguments="${tmp#* }"
32243
32244  # Input might be given as Windows format, start by converting to
32245  # unix format.
32246  new_path=`$CYGPATH -u "$path"`
32247
32248  # Now try to locate executable using which
32249  new_path=`$WHICH "$new_path" 2> /dev/null`
32250  # bat and cmd files are not always considered executable in cygwin causing which
32251  # to not find them
32252  if test "x$new_path" = x \
32253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32255    new_path=`$CYGPATH -u "$path"`
32256  fi
32257  if test "x$new_path" = x; then
32258    # Oops. Which didn't find the executable.
32259    # The splitting of arguments from the executable at a space might have been incorrect,
32260    # since paths with space are more likely in Windows. Give it another try with the whole
32261    # argument.
32262    path="$complete"
32263    arguments="EOL"
32264    new_path=`$CYGPATH -u "$path"`
32265    new_path=`$WHICH "$new_path" 2> /dev/null`
32266    # bat and cmd files are not always considered executable in cygwin causing which
32267    # to not find them
32268    if test "x$new_path" = x \
32269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32271      new_path=`$CYGPATH -u "$path"`
32272    fi
32273    if test "x$new_path" = x; then
32274      # It's still not found. Now this is an unrecoverable error.
32275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32276$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32277      has_space=`$ECHO "$complete" | $GREP " "`
32278      if test "x$has_space" != x; then
32279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32281      fi
32282      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32283    fi
32284  fi
32285
32286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32289  # "foo.exe" is OK but "foo" is an error.
32290  #
32291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32292  # It is also a way to make sure we got the proper file name for the real test later on.
32293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32294  if test "x$test_shortpath" = x; then
32295    # Short path failed, file does not exist as specified.
32296    # Try adding .exe or .cmd
32297    if test -f "${new_path}.exe"; then
32298      input_to_shortpath="${new_path}.exe"
32299    elif test -f "${new_path}.cmd"; then
32300      input_to_shortpath="${new_path}.cmd"
32301    else
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32303$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32306      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32307    fi
32308  else
32309    input_to_shortpath="$new_path"
32310  fi
32311
32312  # Call helper function which possibly converts this using DOS-style short mode.
32313  # If so, the updated path is stored in $new_path.
32314  new_path="$input_to_shortpath"
32315
32316  input_path="$input_to_shortpath"
32317  # Check if we need to convert this using DOS-style short mode. If the path
32318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32319  # take no chances and rewrite it.
32320  # Note: m4 eats our [], so we need to use [ and ] instead.
32321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32322  if test "x$has_forbidden_chars" != x; then
32323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32327      # Going to short mode and back again did indeed matter. Since short mode is
32328      # case insensitive, let's make it lowercase to improve readability.
32329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32330      # Now convert it back to Unix-style (cygpath)
32331      input_path=`$CYGPATH -u "$shortmode_path"`
32332      new_path="$input_path"
32333    fi
32334  fi
32335
32336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32337  if test "x$test_cygdrive_prefix" = x; then
32338    # As a simple fix, exclude /usr/bin since it's not a real path.
32339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32341      # a path prefixed by /cygdrive for fixpath to work.
32342      new_path="$CYGWIN_ROOT_PATH$input_path"
32343    fi
32344  fi
32345
32346  # remove trailing .exe if any
32347  new_path="${new_path/%.exe/}"
32348
32349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32350
32351  # First separate the path from the arguments. This will split at the first
32352  # space.
32353  complete="$VS_ENV_CMD"
32354  path="${complete%% *}"
32355  tmp="$complete EOL"
32356  arguments="${tmp#* }"
32357
32358  # Input might be given as Windows format, start by converting to
32359  # unix format.
32360  new_path="$path"
32361
32362  windows_path="$new_path"
32363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32364    unix_path=`$CYGPATH -u "$windows_path"`
32365    new_path="$unix_path"
32366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32368    new_path="$unix_path"
32369  fi
32370
32371
32372  # Now try to locate executable using which
32373  new_path=`$WHICH "$new_path" 2> /dev/null`
32374
32375  if test "x$new_path" = x; then
32376    # Oops. Which didn't find the executable.
32377    # The splitting of arguments from the executable at a space might have been incorrect,
32378    # since paths with space are more likely in Windows. Give it another try with the whole
32379    # argument.
32380    path="$complete"
32381    arguments="EOL"
32382    new_path="$path"
32383
32384  windows_path="$new_path"
32385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32386    unix_path=`$CYGPATH -u "$windows_path"`
32387    new_path="$unix_path"
32388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32390    new_path="$unix_path"
32391  fi
32392
32393
32394    new_path=`$WHICH "$new_path" 2> /dev/null`
32395    # bat and cmd files are not always considered executable in MSYS causing which
32396    # to not find them
32397    if test "x$new_path" = x \
32398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32400      new_path="$path"
32401
32402  windows_path="$new_path"
32403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32404    unix_path=`$CYGPATH -u "$windows_path"`
32405    new_path="$unix_path"
32406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32408    new_path="$unix_path"
32409  fi
32410
32411    fi
32412
32413    if test "x$new_path" = x; then
32414      # It's still not found. Now this is an unrecoverable error.
32415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32416$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32417      has_space=`$ECHO "$complete" | $GREP " "`
32418      if test "x$has_space" != x; then
32419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32421      fi
32422      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32423    fi
32424  fi
32425
32426  # Now new_path has a complete unix path to the binary
32427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32428    # Keep paths in /bin as-is, but remove trailing .exe if any
32429    new_path="${new_path/%.exe/}"
32430    # Do not save /bin paths to all_fixpath_prefixes!
32431  else
32432    # Not in mixed or Windows style, start by that.
32433    new_path=`cmd //c echo $new_path`
32434
32435  input_path="$new_path"
32436  # Check if we need to convert this using DOS-style short mode. If the path
32437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32438  # take no chances and rewrite it.
32439  # Note: m4 eats our [], so we need to use [ and ] instead.
32440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32441  if test "x$has_forbidden_chars" != x; then
32442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32444  fi
32445
32446    # Output is in $new_path
32447
32448  windows_path="$new_path"
32449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32450    unix_path=`$CYGPATH -u "$windows_path"`
32451    new_path="$unix_path"
32452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32454    new_path="$unix_path"
32455  fi
32456
32457    # remove trailing .exe if any
32458    new_path="${new_path/%.exe/}"
32459
32460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32462  fi
32463
32464    else
32465      # We're on a unix platform. Hooray! :)
32466      # First separate the path from the arguments. This will split at the first
32467      # space.
32468      complete="$VS_ENV_CMD"
32469      path="${complete%% *}"
32470      tmp="$complete EOL"
32471      arguments="${tmp#* }"
32472
32473      # Cannot rely on the command "which" here since it doesn't always work.
32474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32475      if test -z "$is_absolute_path"; then
32476        # Path to executable is not absolute. Find it.
32477        IFS_save="$IFS"
32478        IFS=:
32479        for p in $PATH; do
32480          if test -f "$p/$path" && test -x "$p/$path"; then
32481            new_path="$p/$path"
32482            break
32483          fi
32484        done
32485        IFS="$IFS_save"
32486      else
32487        # This is an absolute path, we can use it without further modifications.
32488        new_path="$path"
32489      fi
32490
32491      if test "x$new_path" = x; then
32492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32493$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32494        has_space=`$ECHO "$complete" | $GREP " "`
32495        if test "x$has_space" != x; then
32496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32498        fi
32499        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32500      fi
32501    fi
32502
32503    # Now join together the path and the arguments once again
32504    if test "x$arguments" != xEOL; then
32505      new_complete="$new_path ${arguments% *}"
32506    else
32507      new_complete="$new_path"
32508    fi
32509
32510    if test "x$complete" != "x$new_complete"; then
32511      VS_ENV_CMD="$new_complete"
32512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32513$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32514    fi
32515  fi
32516
32517
32518      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32519      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32520$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32521
32522      # We need to create a couple of temporary files.
32523      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32524      $MKDIR -p $VS_ENV_TMP_DIR
32525
32526      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32527      # Instead create a shell script which will set the relevant variables when run.
32528      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32529
32530  unix_path="$WINPATH_VS_ENV_CMD"
32531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32532    windows_path=`$CYGPATH -m "$unix_path"`
32533    WINPATH_VS_ENV_CMD="$windows_path"
32534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32535    windows_path=`cmd //c echo $unix_path`
32536    WINPATH_VS_ENV_CMD="$windows_path"
32537  fi
32538
32539      WINPATH_BASH="$BASH"
32540
32541  unix_path="$WINPATH_BASH"
32542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32543    windows_path=`$CYGPATH -m "$unix_path"`
32544    WINPATH_BASH="$windows_path"
32545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32546    windows_path=`cmd //c echo $unix_path`
32547    WINPATH_BASH="$windows_path"
32548  fi
32549
32550
32551      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32552      # script (executable by bash) that will setup the important variables.
32553      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32554      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32555      # This will end up something like:
32556      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32557      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32558      # These will end up something like:
32559      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32560      # The trailing space for everyone except PATH is no typo, but is needed due
32561      # to trailing \ in the Windows paths. These will be stripped later.
32562      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32563          >> $EXTRACT_VC_ENV_BAT_FILE
32564      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32565          >> $EXTRACT_VC_ENV_BAT_FILE
32566      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32567          >> $EXTRACT_VC_ENV_BAT_FILE
32568      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32569          >> $EXTRACT_VC_ENV_BAT_FILE
32570      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32571          >> $EXTRACT_VC_ENV_BAT_FILE
32572      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32573          >> $EXTRACT_VC_ENV_BAT_FILE
32574
32575      # Now execute the newly created bat file.
32576      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32577      # Change directory so we don't need to mess with Windows paths in redirects.
32578      cd $VS_ENV_TMP_DIR
32579      cmd /c extract-vs-env.bat | $CAT
32580      cd $CURDIR
32581
32582      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32583        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32584$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32585        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32586$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32587        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32588$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32589        as_fn_error $? "Cannot continue" "$LINENO" 5
32590      fi
32591
32592      # Now set all paths and other env variables. This will allow the rest of
32593      # the configure script to find and run the compiler in the proper way.
32594      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32595$as_echo "$as_me: Setting extracted environment variables" >&6;}
32596      . $VS_ENV_TMP_DIR/set-vs-env.sh
32597      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32598      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32599    else
32600      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32601      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32602$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32603    fi
32604  fi
32605
32606  # At this point, we should have correct variables in the environment, or we can't continue.
32607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32608$as_echo_n "checking for Visual Studio variables... " >&6; }
32609
32610  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32611      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32612    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32614$as_echo "present but broken" >&6; }
32615      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32616    else
32617      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32618$as_echo "ok" >&6; }
32619      # Remove any trailing "\" ";" and " " from the variables.
32620      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32621      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32622      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32623      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32624      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32625      # Remove any paths containing # (typically F#) as that messes up make. This
32626      # is needed if visual studio was installed with F# support.
32627      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32628
32629
32630
32631
32632
32633      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32634      OLDIFS="$IFS"
32635      IFS=";"
32636      for i in $VS_INCLUDE; do
32637        ipath=$i
32638        # Only process non-empty elements
32639        if test "x$ipath" != x; then
32640          IFS="$OLDIFS"
32641          # Check that directory exists before calling fixup_path
32642          testpath=$ipath
32643
32644  windows_path="$testpath"
32645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32646    unix_path=`$CYGPATH -u "$windows_path"`
32647    testpath="$unix_path"
32648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32650    testpath="$unix_path"
32651  fi
32652
32653          if test -d "$testpath"; then
32654
32655  # Only process if variable expands to non-empty
32656
32657  if test "x$ipath" != x; then
32658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32659
32660  # Input might be given as Windows format, start by converting to
32661  # unix format.
32662  path="$ipath"
32663  new_path=`$CYGPATH -u "$path"`
32664
32665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32668  # "foo.exe" is OK but "foo" is an error.
32669  #
32670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32671  # It is also a way to make sure we got the proper file name for the real test later on.
32672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32673  if test "x$test_shortpath" = x; then
32674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32675$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32676    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32677  fi
32678
32679  # Call helper function which possibly converts this using DOS-style short mode.
32680  # If so, the updated path is stored in $new_path.
32681
32682  input_path="$new_path"
32683  # Check if we need to convert this using DOS-style short mode. If the path
32684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32685  # take no chances and rewrite it.
32686  # Note: m4 eats our [], so we need to use [ and ] instead.
32687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32688  if test "x$has_forbidden_chars" != x; then
32689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32693      # Going to short mode and back again did indeed matter. Since short mode is
32694      # case insensitive, let's make it lowercase to improve readability.
32695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32696      # Now convert it back to Unix-style (cygpath)
32697      input_path=`$CYGPATH -u "$shortmode_path"`
32698      new_path="$input_path"
32699    fi
32700  fi
32701
32702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32703  if test "x$test_cygdrive_prefix" = x; then
32704    # As a simple fix, exclude /usr/bin since it's not a real path.
32705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32707      # a path prefixed by /cygdrive for fixpath to work.
32708      new_path="$CYGWIN_ROOT_PATH$input_path"
32709    fi
32710  fi
32711
32712
32713  if test "x$path" != "x$new_path"; then
32714    ipath="$new_path"
32715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32716$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32717  fi
32718
32719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32720
32721  path="$ipath"
32722  has_colon=`$ECHO $path | $GREP ^.:`
32723  new_path="$path"
32724  if test "x$has_colon" = x; then
32725    # Not in mixed or Windows style, start by that.
32726    new_path=`cmd //c echo $path`
32727  fi
32728
32729
32730  input_path="$new_path"
32731  # Check if we need to convert this using DOS-style short mode. If the path
32732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32733  # take no chances and rewrite it.
32734  # Note: m4 eats our [], so we need to use [ and ] instead.
32735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32736  if test "x$has_forbidden_chars" != x; then
32737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32739  fi
32740
32741
32742  windows_path="$new_path"
32743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32744    unix_path=`$CYGPATH -u "$windows_path"`
32745    new_path="$unix_path"
32746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32748    new_path="$unix_path"
32749  fi
32750
32751  if test "x$path" != "x$new_path"; then
32752    ipath="$new_path"
32753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32754$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32755  fi
32756
32757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32759
32760    else
32761      # We're on a unix platform. Hooray! :)
32762      path="$ipath"
32763      has_space=`$ECHO "$path" | $GREP " "`
32764      if test "x$has_space" != x; then
32765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32766$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32768      fi
32769
32770      # Use eval to expand a potential ~
32771      eval path="$path"
32772      if test ! -f "$path" && test ! -d "$path"; then
32773        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32774      fi
32775
32776      if test -d "$path"; then
32777        ipath="`cd "$path"; $THEPWDCMD -L`"
32778      else
32779        dir="`$DIRNAME "$path"`"
32780        base="`$BASENAME "$path"`"
32781        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32782      fi
32783    fi
32784  fi
32785
32786            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32787          fi
32788          IFS=";"
32789        fi
32790      done
32791      # Convert VS_LIB into SYSROOT_LDFLAGS
32792      for i in $VS_LIB; do
32793        libpath=$i
32794        # Only process non-empty elements
32795        if test "x$libpath" != x; then
32796          IFS="$OLDIFS"
32797          # Check that directory exists before calling fixup_path
32798          testpath=$libpath
32799
32800  windows_path="$testpath"
32801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32802    unix_path=`$CYGPATH -u "$windows_path"`
32803    testpath="$unix_path"
32804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32806    testpath="$unix_path"
32807  fi
32808
32809          if test -d "$testpath"; then
32810
32811  # Only process if variable expands to non-empty
32812
32813  if test "x$libpath" != x; then
32814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32815
32816  # Input might be given as Windows format, start by converting to
32817  # unix format.
32818  path="$libpath"
32819  new_path=`$CYGPATH -u "$path"`
32820
32821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32824  # "foo.exe" is OK but "foo" is an error.
32825  #
32826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32827  # It is also a way to make sure we got the proper file name for the real test later on.
32828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32829  if test "x$test_shortpath" = x; then
32830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32831$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32832    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32833  fi
32834
32835  # Call helper function which possibly converts this using DOS-style short mode.
32836  # If so, the updated path is stored in $new_path.
32837
32838  input_path="$new_path"
32839  # Check if we need to convert this using DOS-style short mode. If the path
32840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32841  # take no chances and rewrite it.
32842  # Note: m4 eats our [], so we need to use [ and ] instead.
32843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32844  if test "x$has_forbidden_chars" != x; then
32845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32849      # Going to short mode and back again did indeed matter. Since short mode is
32850      # case insensitive, let's make it lowercase to improve readability.
32851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32852      # Now convert it back to Unix-style (cygpath)
32853      input_path=`$CYGPATH -u "$shortmode_path"`
32854      new_path="$input_path"
32855    fi
32856  fi
32857
32858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32859  if test "x$test_cygdrive_prefix" = x; then
32860    # As a simple fix, exclude /usr/bin since it's not a real path.
32861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32863      # a path prefixed by /cygdrive for fixpath to work.
32864      new_path="$CYGWIN_ROOT_PATH$input_path"
32865    fi
32866  fi
32867
32868
32869  if test "x$path" != "x$new_path"; then
32870    libpath="$new_path"
32871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32872$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32873  fi
32874
32875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32876
32877  path="$libpath"
32878  has_colon=`$ECHO $path | $GREP ^.:`
32879  new_path="$path"
32880  if test "x$has_colon" = x; then
32881    # Not in mixed or Windows style, start by that.
32882    new_path=`cmd //c echo $path`
32883  fi
32884
32885
32886  input_path="$new_path"
32887  # Check if we need to convert this using DOS-style short mode. If the path
32888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32889  # take no chances and rewrite it.
32890  # Note: m4 eats our [], so we need to use [ and ] instead.
32891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32892  if test "x$has_forbidden_chars" != x; then
32893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32895  fi
32896
32897
32898  windows_path="$new_path"
32899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32900    unix_path=`$CYGPATH -u "$windows_path"`
32901    new_path="$unix_path"
32902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32904    new_path="$unix_path"
32905  fi
32906
32907  if test "x$path" != "x$new_path"; then
32908    libpath="$new_path"
32909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32910$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32911  fi
32912
32913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32915
32916    else
32917      # We're on a unix platform. Hooray! :)
32918      path="$libpath"
32919      has_space=`$ECHO "$path" | $GREP " "`
32920      if test "x$has_space" != x; then
32921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32922$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32924      fi
32925
32926      # Use eval to expand a potential ~
32927      eval path="$path"
32928      if test ! -f "$path" && test ! -d "$path"; then
32929        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32930      fi
32931
32932      if test -d "$path"; then
32933        libpath="`cd "$path"; $THEPWDCMD -L`"
32934      else
32935        dir="`$DIRNAME "$path"`"
32936        base="`$BASENAME "$path"`"
32937        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32938      fi
32939    fi
32940  fi
32941
32942            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32943          fi
32944          IFS=";"
32945        fi
32946      done
32947      IFS="$OLDIFS"
32948    fi
32949  else
32950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32951$as_echo "not found" >&6; }
32952
32953    if test "x$VS_ENV_CMD" = x; then
32954      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32955$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32956      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32957$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32958    else
32959      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32960$as_echo "$as_me: Running the extraction script failed." >&6;}
32961    fi
32962    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32963$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32964    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32965$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32966    as_fn_error $? "Cannot continue" "$LINENO" 5
32967  fi
32968
32969    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32970    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32971    PATH="$VS_PATH"
32972    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32973    export INCLUDE="$VS_INCLUDE"
32974    export LIB="$VS_LIB"
32975  else
32976    if test "x$XCODE_VERSION_OUTPUT" != x; then
32977      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32978      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32979      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32980    else
32981      # Currently we do not define this for other toolchains. This might change as the need arise.
32982      TOOLCHAIN_VERSION=
32983    fi
32984  fi
32985
32986
32987  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32988  # override all other locations.
32989  if test "x$TOOLCHAIN_PATH" != x; then
32990    PATH=$TOOLCHAIN_PATH:$PATH
32991  fi
32992
32993
32994  #
32995  # Setup the compilers (CC and CXX)
32996  #
32997
32998  COMPILER_NAME=C
32999  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33000
33001  if test "x$CC" != x; then
33002    # User has supplied compiler name already, always let that override.
33003    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33004$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33005    if test "x`basename $CC`" = "x$CC"; then
33006      # A command without a complete path is provided, search $PATH.
33007
33008      for ac_prog in $CC
33009do
33010  # Extract the first word of "$ac_prog", so it can be a program name with args.
33011set dummy $ac_prog; ac_word=$2
33012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33013$as_echo_n "checking for $ac_word... " >&6; }
33014if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33015  $as_echo_n "(cached) " >&6
33016else
33017  case $POTENTIAL_CC in
33018  [\\/]* | ?:[\\/]*)
33019  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33020  ;;
33021  *)
33022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33023for as_dir in $PATH
33024do
33025  IFS=$as_save_IFS
33026  test -z "$as_dir" && as_dir=.
33027    for ac_exec_ext in '' $ac_executable_extensions; do
33028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33029    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33031    break 2
33032  fi
33033done
33034  done
33035IFS=$as_save_IFS
33036
33037  ;;
33038esac
33039fi
33040POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33041if test -n "$POTENTIAL_CC"; then
33042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33043$as_echo "$POTENTIAL_CC" >&6; }
33044else
33045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33046$as_echo "no" >&6; }
33047fi
33048
33049
33050  test -n "$POTENTIAL_CC" && break
33051done
33052
33053      if test "x$POTENTIAL_CC" != x; then
33054        CC=$POTENTIAL_CC
33055      else
33056        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33057      fi
33058    else
33059      # Otherwise it might already be a complete path
33060      if test ! -x "$CC"; then
33061        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33062      fi
33063    fi
33064  else
33065    # No user supplied value. Locate compiler ourselves.
33066
33067    # If we are cross compiling, assume cross compilation tools follows the
33068    # cross compilation standard where they are prefixed with the autoconf
33069    # standard name for the target. For example the binary
33070    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33071    # If we are not cross compiling, then the default compiler name will be
33072    # used.
33073
33074    CC=
33075    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33076    # before checking the rest of the PATH.
33077    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33078    # step, this should not be necessary.
33079    if test -n "$TOOLCHAIN_PATH"; then
33080      PATH_save="$PATH"
33081      PATH="$TOOLCHAIN_PATH"
33082      for ac_prog in $SEARCH_LIST
33083do
33084  # Extract the first word of "$ac_prog", so it can be a program name with args.
33085set dummy $ac_prog; ac_word=$2
33086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33087$as_echo_n "checking for $ac_word... " >&6; }
33088if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33089  $as_echo_n "(cached) " >&6
33090else
33091  case $TOOLCHAIN_PATH_CC in
33092  [\\/]* | ?:[\\/]*)
33093  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33094  ;;
33095  *)
33096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33097for as_dir in $PATH
33098do
33099  IFS=$as_save_IFS
33100  test -z "$as_dir" && as_dir=.
33101    for ac_exec_ext in '' $ac_executable_extensions; do
33102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33103    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33105    break 2
33106  fi
33107done
33108  done
33109IFS=$as_save_IFS
33110
33111  ;;
33112esac
33113fi
33114TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33115if test -n "$TOOLCHAIN_PATH_CC"; then
33116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33117$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33118else
33119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33120$as_echo "no" >&6; }
33121fi
33122
33123
33124  test -n "$TOOLCHAIN_PATH_CC" && break
33125done
33126
33127      CC=$TOOLCHAIN_PATH_CC
33128      PATH="$PATH_save"
33129    fi
33130
33131    # AC_PATH_PROGS can't be run multiple times with the same variable,
33132    # so create a new name for this run.
33133    if test "x$CC" = x; then
33134      for ac_prog in $SEARCH_LIST
33135do
33136  # Extract the first word of "$ac_prog", so it can be a program name with args.
33137set dummy $ac_prog; ac_word=$2
33138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33139$as_echo_n "checking for $ac_word... " >&6; }
33140if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33141  $as_echo_n "(cached) " >&6
33142else
33143  case $POTENTIAL_CC in
33144  [\\/]* | ?:[\\/]*)
33145  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33146  ;;
33147  *)
33148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33149for as_dir in $PATH
33150do
33151  IFS=$as_save_IFS
33152  test -z "$as_dir" && as_dir=.
33153    for ac_exec_ext in '' $ac_executable_extensions; do
33154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33155    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33157    break 2
33158  fi
33159done
33160  done
33161IFS=$as_save_IFS
33162
33163  ;;
33164esac
33165fi
33166POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33167if test -n "$POTENTIAL_CC"; then
33168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33169$as_echo "$POTENTIAL_CC" >&6; }
33170else
33171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33172$as_echo "no" >&6; }
33173fi
33174
33175
33176  test -n "$POTENTIAL_CC" && break
33177done
33178
33179      CC=$POTENTIAL_CC
33180    fi
33181
33182    if test "x$CC" = x; then
33183
33184  # Print a helpful message on how to acquire the necessary build dependency.
33185  # devkit is the help tag: freetype, cups, alsa etc
33186  MISSING_DEPENDENCY=devkit
33187
33188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33189    cygwin_help $MISSING_DEPENDENCY
33190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33191    msys_help $MISSING_DEPENDENCY
33192  else
33193    PKGHANDLER_COMMAND=
33194
33195    case $PKGHANDLER in
33196      apt-get)
33197        apt_help     $MISSING_DEPENDENCY ;;
33198      yum)
33199        yum_help     $MISSING_DEPENDENCY ;;
33200      port)
33201        port_help    $MISSING_DEPENDENCY ;;
33202      pkgutil)
33203        pkgutil_help $MISSING_DEPENDENCY ;;
33204      pkgadd)
33205        pkgadd_help  $MISSING_DEPENDENCY ;;
33206    esac
33207
33208    if test "x$PKGHANDLER_COMMAND" != x; then
33209      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33210    fi
33211  fi
33212
33213      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33214    fi
33215  fi
33216
33217  # Now we have a compiler binary in CC. Make sure it's okay.
33218
33219  # Only process if variable expands to non-empty
33220
33221  if test "x$CC" != x; then
33222    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33223
33224  # First separate the path from the arguments. This will split at the first
33225  # space.
33226  complete="$CC"
33227  path="${complete%% *}"
33228  tmp="$complete EOL"
33229  arguments="${tmp#* }"
33230
33231  # Input might be given as Windows format, start by converting to
33232  # unix format.
33233  new_path=`$CYGPATH -u "$path"`
33234
33235  # Now try to locate executable using which
33236  new_path=`$WHICH "$new_path" 2> /dev/null`
33237  # bat and cmd files are not always considered executable in cygwin causing which
33238  # to not find them
33239  if test "x$new_path" = x \
33240      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33241      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33242    new_path=`$CYGPATH -u "$path"`
33243  fi
33244  if test "x$new_path" = x; then
33245    # Oops. Which didn't find the executable.
33246    # The splitting of arguments from the executable at a space might have been incorrect,
33247    # since paths with space are more likely in Windows. Give it another try with the whole
33248    # argument.
33249    path="$complete"
33250    arguments="EOL"
33251    new_path=`$CYGPATH -u "$path"`
33252    new_path=`$WHICH "$new_path" 2> /dev/null`
33253    # bat and cmd files are not always considered executable in cygwin causing which
33254    # to not find them
33255    if test "x$new_path" = x \
33256        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33257        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33258      new_path=`$CYGPATH -u "$path"`
33259    fi
33260    if test "x$new_path" = x; then
33261      # It's still not found. Now this is an unrecoverable error.
33262      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33263$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33264      has_space=`$ECHO "$complete" | $GREP " "`
33265      if test "x$has_space" != x; then
33266        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33267$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33268      fi
33269      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33270    fi
33271  fi
33272
33273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33276  # "foo.exe" is OK but "foo" is an error.
33277  #
33278  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33279  # It is also a way to make sure we got the proper file name for the real test later on.
33280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33281  if test "x$test_shortpath" = x; then
33282    # Short path failed, file does not exist as specified.
33283    # Try adding .exe or .cmd
33284    if test -f "${new_path}.exe"; then
33285      input_to_shortpath="${new_path}.exe"
33286    elif test -f "${new_path}.cmd"; then
33287      input_to_shortpath="${new_path}.cmd"
33288    else
33289      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33290$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33291      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33292$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33293      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33294    fi
33295  else
33296    input_to_shortpath="$new_path"
33297  fi
33298
33299  # Call helper function which possibly converts this using DOS-style short mode.
33300  # If so, the updated path is stored in $new_path.
33301  new_path="$input_to_shortpath"
33302
33303  input_path="$input_to_shortpath"
33304  # Check if we need to convert this using DOS-style short mode. If the path
33305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33306  # take no chances and rewrite it.
33307  # Note: m4 eats our [], so we need to use [ and ] instead.
33308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33309  if test "x$has_forbidden_chars" != x; then
33310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33314      # Going to short mode and back again did indeed matter. Since short mode is
33315      # case insensitive, let's make it lowercase to improve readability.
33316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33317      # Now convert it back to Unix-style (cygpath)
33318      input_path=`$CYGPATH -u "$shortmode_path"`
33319      new_path="$input_path"
33320    fi
33321  fi
33322
33323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33324  if test "x$test_cygdrive_prefix" = x; then
33325    # As a simple fix, exclude /usr/bin since it's not a real path.
33326    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33328      # a path prefixed by /cygdrive for fixpath to work.
33329      new_path="$CYGWIN_ROOT_PATH$input_path"
33330    fi
33331  fi
33332
33333  # remove trailing .exe if any
33334  new_path="${new_path/%.exe/}"
33335
33336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33337
33338  # First separate the path from the arguments. This will split at the first
33339  # space.
33340  complete="$CC"
33341  path="${complete%% *}"
33342  tmp="$complete EOL"
33343  arguments="${tmp#* }"
33344
33345  # Input might be given as Windows format, start by converting to
33346  # unix format.
33347  new_path="$path"
33348
33349  windows_path="$new_path"
33350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33351    unix_path=`$CYGPATH -u "$windows_path"`
33352    new_path="$unix_path"
33353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33355    new_path="$unix_path"
33356  fi
33357
33358
33359  # Now try to locate executable using which
33360  new_path=`$WHICH "$new_path" 2> /dev/null`
33361
33362  if test "x$new_path" = x; then
33363    # Oops. Which didn't find the executable.
33364    # The splitting of arguments from the executable at a space might have been incorrect,
33365    # since paths with space are more likely in Windows. Give it another try with the whole
33366    # argument.
33367    path="$complete"
33368    arguments="EOL"
33369    new_path="$path"
33370
33371  windows_path="$new_path"
33372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33373    unix_path=`$CYGPATH -u "$windows_path"`
33374    new_path="$unix_path"
33375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33377    new_path="$unix_path"
33378  fi
33379
33380
33381    new_path=`$WHICH "$new_path" 2> /dev/null`
33382    # bat and cmd files are not always considered executable in MSYS causing which
33383    # to not find them
33384    if test "x$new_path" = x \
33385        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33386        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33387      new_path="$path"
33388
33389  windows_path="$new_path"
33390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33391    unix_path=`$CYGPATH -u "$windows_path"`
33392    new_path="$unix_path"
33393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33395    new_path="$unix_path"
33396  fi
33397
33398    fi
33399
33400    if test "x$new_path" = x; then
33401      # It's still not found. Now this is an unrecoverable error.
33402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33403$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33404      has_space=`$ECHO "$complete" | $GREP " "`
33405      if test "x$has_space" != x; then
33406        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33407$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33408      fi
33409      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33410    fi
33411  fi
33412
33413  # Now new_path has a complete unix path to the binary
33414  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33415    # Keep paths in /bin as-is, but remove trailing .exe if any
33416    new_path="${new_path/%.exe/}"
33417    # Do not save /bin paths to all_fixpath_prefixes!
33418  else
33419    # Not in mixed or Windows style, start by that.
33420    new_path=`cmd //c echo $new_path`
33421
33422  input_path="$new_path"
33423  # Check if we need to convert this using DOS-style short mode. If the path
33424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33425  # take no chances and rewrite it.
33426  # Note: m4 eats our [], so we need to use [ and ] instead.
33427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33428  if test "x$has_forbidden_chars" != x; then
33429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33431  fi
33432
33433    # Output is in $new_path
33434
33435  windows_path="$new_path"
33436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33437    unix_path=`$CYGPATH -u "$windows_path"`
33438    new_path="$unix_path"
33439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33441    new_path="$unix_path"
33442  fi
33443
33444    # remove trailing .exe if any
33445    new_path="${new_path/%.exe/}"
33446
33447    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33448    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33449  fi
33450
33451    else
33452      # We're on a unix platform. Hooray! :)
33453      # First separate the path from the arguments. This will split at the first
33454      # space.
33455      complete="$CC"
33456      path="${complete%% *}"
33457      tmp="$complete EOL"
33458      arguments="${tmp#* }"
33459
33460      # Cannot rely on the command "which" here since it doesn't always work.
33461      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33462      if test -z "$is_absolute_path"; then
33463        # Path to executable is not absolute. Find it.
33464        IFS_save="$IFS"
33465        IFS=:
33466        for p in $PATH; do
33467          if test -f "$p/$path" && test -x "$p/$path"; then
33468            new_path="$p/$path"
33469            break
33470          fi
33471        done
33472        IFS="$IFS_save"
33473      else
33474        # This is an absolute path, we can use it without further modifications.
33475        new_path="$path"
33476      fi
33477
33478      if test "x$new_path" = x; then
33479        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33480$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33481        has_space=`$ECHO "$complete" | $GREP " "`
33482        if test "x$has_space" != x; then
33483          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33484$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33485        fi
33486        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33487      fi
33488    fi
33489
33490    # Now join together the path and the arguments once again
33491    if test "x$arguments" != xEOL; then
33492      new_complete="$new_path ${arguments% *}"
33493    else
33494      new_complete="$new_path"
33495    fi
33496
33497    if test "x$complete" != "x$new_complete"; then
33498      CC="$new_complete"
33499      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33500$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33501    fi
33502  fi
33503
33504  TEST_COMPILER="$CC"
33505
33506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33507$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33508  SYMLINK_ORIGINAL="$TEST_COMPILER"
33509
33510  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33511    # Follow a chain of symbolic links. Use readlink
33512    # where it exists, else fall back to horribly
33513    # complicated shell code.
33514    if test "x$READLINK_TESTED" != yes; then
33515      # On MacOSX there is a readlink tool with a different
33516      # purpose than the GNU readlink tool. Check the found readlink.
33517      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33518      if test "x$ISGNU" = x; then
33519        # A readlink that we do not know how to use.
33520        # Are there other non-GNU readlinks out there?
33521        READLINK_TESTED=yes
33522        READLINK=
33523      fi
33524    fi
33525
33526    if test "x$READLINK" != x; then
33527      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33528    else
33529      # Save the current directory for restoring afterwards
33530      STARTDIR=$PWD
33531      COUNTER=0
33532      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33533      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33534      cd $sym_link_dir
33535      # Use -P flag to resolve symlinks in directories.
33536      cd `$THEPWDCMD -P`
33537      sym_link_dir=`$THEPWDCMD -P`
33538      # Resolve file symlinks
33539      while test $COUNTER -lt 20; do
33540        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33541        if test "x$ISLINK" == x; then
33542          # This is not a symbolic link! We are done!
33543          break
33544        fi
33545        # Again resolve directory symlinks since the target of the just found
33546        # link could be in a different directory
33547        cd `$DIRNAME $ISLINK`
33548        sym_link_dir=`$THEPWDCMD -P`
33549        sym_link_file=`$BASENAME $ISLINK`
33550        let COUNTER=COUNTER+1
33551      done
33552      cd $STARTDIR
33553      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33554    fi
33555  fi
33556
33557  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33559$as_echo "no symlink" >&6; }
33560  else
33561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33562$as_echo "$SYMLINK_ORIGINAL" >&6; }
33563
33564    # We can't handle ccache by gcc wrappers, since we need to know if we're
33565    # using ccache. Instead ccache usage must be controlled by a configure option.
33566    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33567    if test "x$COMPILER_BASENAME" = "xccache"; then
33568      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33569$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33570      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33571    fi
33572  fi
33573
33574
33575  COMPILER=$CC
33576  COMPILER_NAME=$COMPILER_NAME
33577
33578  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33579    # cc -V output typically looks like
33580    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33581    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33582    # Check that this is likely to be the Solaris Studio cc.
33583    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33584    if test $? -ne 0; then
33585      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33586      { $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
33587$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33588      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33589$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33591$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33592      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33593    fi
33594    # Remove usage instructions (if present), and
33595    # collapse compiler output into a single line
33596    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33597        $SED -e 's/ *[Uu]sage:.*//'`
33598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33599        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33600  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33601    # xlc -qversion output typically looks like
33602    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33603    #     Version: 11.01.0000.0015
33604    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33605    # Check that this is likely to be the IBM XL C compiler.
33606    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33607    if test $? -ne 0; then
33608      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33609      { $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
33610$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33612$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33613      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33614$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33615      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33616    fi
33617    # Collapse compiler output into a single line
33618    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33619    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33620        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33621  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33622    # There is no specific version flag, but all output starts with a version string.
33623    # First line typically looks something like:
33624    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33625    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33626    # Check that this is likely to be Microsoft CL.EXE.
33627    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33628    if test $? -ne 0; then
33629      { $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
33630$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33631      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33632$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33633      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33634    fi
33635    # Collapse compiler output into a single line
33636    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33637    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33638        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33639  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33640    # gcc --version output typically looks like
33641    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33642    #     Copyright (C) 2013 Free Software Foundation, Inc.
33643    #     This is free software; see the source for copying conditions.  There is NO
33644    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33645    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33646    # Check that this is likely to be GCC.
33647    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33648    if test $? -ne 0; then
33649      { $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
33650$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33651      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33652$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33653      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33654    fi
33655    # Remove Copyright and legalese from version string, and
33656    # collapse into a single line
33657    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33658        $SED -e 's/ *Copyright .*//'`
33659    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33660        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33661  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33662    # clang --version output typically looks like
33663    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33664    #    clang version 3.3 (tags/RELEASE_33/final)
33665    # or
33666    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33667    #    Target: x86_64-pc-linux-gnu
33668    #    Thread model: posix
33669    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33670    # Check that this is likely to be clang
33671    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33672    if test $? -ne 0; then
33673      { $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
33674$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33675      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33676$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33677      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33678    fi
33679    # Collapse compiler output into a single line
33680    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33681    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33682        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33683  else
33684      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33685  fi
33686  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33687  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33688  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33689  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33690
33691  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33692$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33693
33694
33695  # Now that we have resolved CC ourself, let autoconf have its go at it
33696  ac_ext=c
33697ac_cpp='$CPP $CPPFLAGS'
33698ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33699ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33700ac_compiler_gnu=$ac_cv_c_compiler_gnu
33701if test -n "$ac_tool_prefix"; then
33702  for ac_prog in $CC
33703  do
33704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33707$as_echo_n "checking for $ac_word... " >&6; }
33708if ${ac_cv_prog_CC+:} false; then :
33709  $as_echo_n "(cached) " >&6
33710else
33711  if test -n "$CC"; then
33712  ac_cv_prog_CC="$CC" # Let the user override the test.
33713else
33714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33715for as_dir in $PATH
33716do
33717  IFS=$as_save_IFS
33718  test -z "$as_dir" && as_dir=.
33719    for ac_exec_ext in '' $ac_executable_extensions; do
33720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33721    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33723    break 2
33724  fi
33725done
33726  done
33727IFS=$as_save_IFS
33728
33729fi
33730fi
33731CC=$ac_cv_prog_CC
33732if test -n "$CC"; then
33733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33734$as_echo "$CC" >&6; }
33735else
33736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33737$as_echo "no" >&6; }
33738fi
33739
33740
33741    test -n "$CC" && break
33742  done
33743fi
33744if test -z "$CC"; then
33745  ac_ct_CC=$CC
33746  for ac_prog in $CC
33747do
33748  # Extract the first word of "$ac_prog", so it can be a program name with args.
33749set dummy $ac_prog; ac_word=$2
33750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33751$as_echo_n "checking for $ac_word... " >&6; }
33752if ${ac_cv_prog_ac_ct_CC+:} false; then :
33753  $as_echo_n "(cached) " >&6
33754else
33755  if test -n "$ac_ct_CC"; then
33756  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33757else
33758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33759for as_dir in $PATH
33760do
33761  IFS=$as_save_IFS
33762  test -z "$as_dir" && as_dir=.
33763    for ac_exec_ext in '' $ac_executable_extensions; do
33764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33765    ac_cv_prog_ac_ct_CC="$ac_prog"
33766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33767    break 2
33768  fi
33769done
33770  done
33771IFS=$as_save_IFS
33772
33773fi
33774fi
33775ac_ct_CC=$ac_cv_prog_ac_ct_CC
33776if test -n "$ac_ct_CC"; then
33777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33778$as_echo "$ac_ct_CC" >&6; }
33779else
33780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33781$as_echo "no" >&6; }
33782fi
33783
33784
33785  test -n "$ac_ct_CC" && break
33786done
33787
33788  if test "x$ac_ct_CC" = x; then
33789    CC=""
33790  else
33791    case $cross_compiling:$ac_tool_warned in
33792yes:)
33793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33795ac_tool_warned=yes ;;
33796esac
33797    CC=$ac_ct_CC
33798  fi
33799fi
33800
33801
33802test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33804as_fn_error $? "no acceptable C compiler found in \$PATH
33805See \`config.log' for more details" "$LINENO" 5; }
33806
33807# Provide some information about the compiler.
33808$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33809set X $ac_compile
33810ac_compiler=$2
33811for ac_option in --version -v -V -qversion; do
33812  { { ac_try="$ac_compiler $ac_option >&5"
33813case "(($ac_try" in
33814  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33815  *) ac_try_echo=$ac_try;;
33816esac
33817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33818$as_echo "$ac_try_echo"; } >&5
33819  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33820  ac_status=$?
33821  if test -s conftest.err; then
33822    sed '10a\
33823... rest of stderr output deleted ...
33824         10q' conftest.err >conftest.er1
33825    cat conftest.er1 >&5
33826  fi
33827  rm -f conftest.er1 conftest.err
33828  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33829  test $ac_status = 0; }
33830done
33831
33832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33833/* end confdefs.h.  */
33834
33835int
33836main ()
33837{
33838
33839  ;
33840  return 0;
33841}
33842_ACEOF
33843ac_clean_files_save=$ac_clean_files
33844ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33845# Try to create an executable without -o first, disregard a.out.
33846# It will help us diagnose broken compilers, and finding out an intuition
33847# of exeext.
33848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33849$as_echo_n "checking whether the C compiler works... " >&6; }
33850ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33851
33852# The possible output files:
33853ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33854
33855ac_rmfiles=
33856for ac_file in $ac_files
33857do
33858  case $ac_file in
33859    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33860    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33861  esac
33862done
33863rm -f $ac_rmfiles
33864
33865if { { ac_try="$ac_link_default"
33866case "(($ac_try" in
33867  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33868  *) ac_try_echo=$ac_try;;
33869esac
33870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33871$as_echo "$ac_try_echo"; } >&5
33872  (eval "$ac_link_default") 2>&5
33873  ac_status=$?
33874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33875  test $ac_status = 0; }; then :
33876  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33877# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33878# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33879# so that the user can short-circuit this test for compilers unknown to
33880# Autoconf.
33881for ac_file in $ac_files ''
33882do
33883  test -f "$ac_file" || continue
33884  case $ac_file in
33885    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33886	;;
33887    [ab].out )
33888	# We found the default executable, but exeext='' is most
33889	# certainly right.
33890	break;;
33891    *.* )
33892	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33893	then :; else
33894	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33895	fi
33896	# We set ac_cv_exeext here because the later test for it is not
33897	# safe: cross compilers may not add the suffix if given an `-o'
33898	# argument, so we may need to know it at that point already.
33899	# Even if this section looks crufty: it has the advantage of
33900	# actually working.
33901	break;;
33902    * )
33903	break;;
33904  esac
33905done
33906test "$ac_cv_exeext" = no && ac_cv_exeext=
33907
33908else
33909  ac_file=''
33910fi
33911if test -z "$ac_file"; then :
33912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33913$as_echo "no" >&6; }
33914$as_echo "$as_me: failed program was:" >&5
33915sed 's/^/| /' conftest.$ac_ext >&5
33916
33917{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33919as_fn_error 77 "C compiler cannot create executables
33920See \`config.log' for more details" "$LINENO" 5; }
33921else
33922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33923$as_echo "yes" >&6; }
33924fi
33925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33926$as_echo_n "checking for C compiler default output file name... " >&6; }
33927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33928$as_echo "$ac_file" >&6; }
33929ac_exeext=$ac_cv_exeext
33930
33931rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33932ac_clean_files=$ac_clean_files_save
33933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33934$as_echo_n "checking for suffix of executables... " >&6; }
33935if { { ac_try="$ac_link"
33936case "(($ac_try" in
33937  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33938  *) ac_try_echo=$ac_try;;
33939esac
33940eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33941$as_echo "$ac_try_echo"; } >&5
33942  (eval "$ac_link") 2>&5
33943  ac_status=$?
33944  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33945  test $ac_status = 0; }; then :
33946  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33947# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33948# work properly (i.e., refer to `conftest.exe'), while it won't with
33949# `rm'.
33950for ac_file in conftest.exe conftest conftest.*; do
33951  test -f "$ac_file" || continue
33952  case $ac_file in
33953    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33954    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33955	  break;;
33956    * ) break;;
33957  esac
33958done
33959else
33960  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33962as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33963See \`config.log' for more details" "$LINENO" 5; }
33964fi
33965rm -f conftest conftest$ac_cv_exeext
33966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33967$as_echo "$ac_cv_exeext" >&6; }
33968
33969rm -f conftest.$ac_ext
33970EXEEXT=$ac_cv_exeext
33971ac_exeext=$EXEEXT
33972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33973/* end confdefs.h.  */
33974#include <stdio.h>
33975int
33976main ()
33977{
33978FILE *f = fopen ("conftest.out", "w");
33979 return ferror (f) || fclose (f) != 0;
33980
33981  ;
33982  return 0;
33983}
33984_ACEOF
33985ac_clean_files="$ac_clean_files conftest.out"
33986# Check that the compiler produces executables we can run.  If not, either
33987# the compiler is broken, or we cross compile.
33988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33989$as_echo_n "checking whether we are cross compiling... " >&6; }
33990if test "$cross_compiling" != yes; then
33991  { { ac_try="$ac_link"
33992case "(($ac_try" in
33993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33994  *) ac_try_echo=$ac_try;;
33995esac
33996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33997$as_echo "$ac_try_echo"; } >&5
33998  (eval "$ac_link") 2>&5
33999  ac_status=$?
34000  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34001  test $ac_status = 0; }
34002  if { ac_try='./conftest$ac_cv_exeext'
34003  { { case "(($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_try") 2>&5
34010  ac_status=$?
34011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34012  test $ac_status = 0; }; }; then
34013    cross_compiling=no
34014  else
34015    if test "$cross_compiling" = maybe; then
34016	cross_compiling=yes
34017    else
34018	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34020as_fn_error $? "cannot run C compiled programs.
34021If you meant to cross compile, use \`--host'.
34022See \`config.log' for more details" "$LINENO" 5; }
34023    fi
34024  fi
34025fi
34026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34027$as_echo "$cross_compiling" >&6; }
34028
34029rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34030ac_clean_files=$ac_clean_files_save
34031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34032$as_echo_n "checking for suffix of object files... " >&6; }
34033if ${ac_cv_objext+:} false; then :
34034  $as_echo_n "(cached) " >&6
34035else
34036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34037/* end confdefs.h.  */
34038
34039int
34040main ()
34041{
34042
34043  ;
34044  return 0;
34045}
34046_ACEOF
34047rm -f conftest.o conftest.obj
34048if { { ac_try="$ac_compile"
34049case "(($ac_try" in
34050  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34051  *) ac_try_echo=$ac_try;;
34052esac
34053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34054$as_echo "$ac_try_echo"; } >&5
34055  (eval "$ac_compile") 2>&5
34056  ac_status=$?
34057  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34058  test $ac_status = 0; }; then :
34059  for ac_file in conftest.o conftest.obj conftest.*; do
34060  test -f "$ac_file" || continue;
34061  case $ac_file in
34062    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34063    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34064       break;;
34065  esac
34066done
34067else
34068  $as_echo "$as_me: failed program was:" >&5
34069sed 's/^/| /' conftest.$ac_ext >&5
34070
34071{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34073as_fn_error $? "cannot compute suffix of object files: cannot compile
34074See \`config.log' for more details" "$LINENO" 5; }
34075fi
34076rm -f conftest.$ac_cv_objext conftest.$ac_ext
34077fi
34078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34079$as_echo "$ac_cv_objext" >&6; }
34080OBJEXT=$ac_cv_objext
34081ac_objext=$OBJEXT
34082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34083$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34084if ${ac_cv_c_compiler_gnu+:} false; then :
34085  $as_echo_n "(cached) " >&6
34086else
34087  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34088/* end confdefs.h.  */
34089
34090int
34091main ()
34092{
34093#ifndef __GNUC__
34094       choke me
34095#endif
34096
34097  ;
34098  return 0;
34099}
34100_ACEOF
34101if ac_fn_c_try_compile "$LINENO"; then :
34102  ac_compiler_gnu=yes
34103else
34104  ac_compiler_gnu=no
34105fi
34106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34107ac_cv_c_compiler_gnu=$ac_compiler_gnu
34108
34109fi
34110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34111$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34112if test $ac_compiler_gnu = yes; then
34113  GCC=yes
34114else
34115  GCC=
34116fi
34117ac_test_CFLAGS=${CFLAGS+set}
34118ac_save_CFLAGS=$CFLAGS
34119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34120$as_echo_n "checking whether $CC accepts -g... " >&6; }
34121if ${ac_cv_prog_cc_g+:} false; then :
34122  $as_echo_n "(cached) " >&6
34123else
34124  ac_save_c_werror_flag=$ac_c_werror_flag
34125   ac_c_werror_flag=yes
34126   ac_cv_prog_cc_g=no
34127   CFLAGS="-g"
34128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34129/* end confdefs.h.  */
34130
34131int
34132main ()
34133{
34134
34135  ;
34136  return 0;
34137}
34138_ACEOF
34139if ac_fn_c_try_compile "$LINENO"; then :
34140  ac_cv_prog_cc_g=yes
34141else
34142  CFLAGS=""
34143      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34144/* end confdefs.h.  */
34145
34146int
34147main ()
34148{
34149
34150  ;
34151  return 0;
34152}
34153_ACEOF
34154if ac_fn_c_try_compile "$LINENO"; then :
34155
34156else
34157  ac_c_werror_flag=$ac_save_c_werror_flag
34158	 CFLAGS="-g"
34159	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34160/* end confdefs.h.  */
34161
34162int
34163main ()
34164{
34165
34166  ;
34167  return 0;
34168}
34169_ACEOF
34170if ac_fn_c_try_compile "$LINENO"; then :
34171  ac_cv_prog_cc_g=yes
34172fi
34173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34174fi
34175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34176fi
34177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34178   ac_c_werror_flag=$ac_save_c_werror_flag
34179fi
34180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34181$as_echo "$ac_cv_prog_cc_g" >&6; }
34182if test "$ac_test_CFLAGS" = set; then
34183  CFLAGS=$ac_save_CFLAGS
34184elif test $ac_cv_prog_cc_g = yes; then
34185  if test "$GCC" = yes; then
34186    CFLAGS="-g -O2"
34187  else
34188    CFLAGS="-g"
34189  fi
34190else
34191  if test "$GCC" = yes; then
34192    CFLAGS="-O2"
34193  else
34194    CFLAGS=
34195  fi
34196fi
34197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34198$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34199if ${ac_cv_prog_cc_c89+:} false; then :
34200  $as_echo_n "(cached) " >&6
34201else
34202  ac_cv_prog_cc_c89=no
34203ac_save_CC=$CC
34204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34205/* end confdefs.h.  */
34206#include <stdarg.h>
34207#include <stdio.h>
34208struct stat;
34209/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34210struct buf { int x; };
34211FILE * (*rcsopen) (struct buf *, struct stat *, int);
34212static char *e (p, i)
34213     char **p;
34214     int i;
34215{
34216  return p[i];
34217}
34218static char *f (char * (*g) (char **, int), char **p, ...)
34219{
34220  char *s;
34221  va_list v;
34222  va_start (v,p);
34223  s = g (p, va_arg (v,int));
34224  va_end (v);
34225  return s;
34226}
34227
34228/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34229   function prototypes and stuff, but not '\xHH' hex character constants.
34230   These don't provoke an error unfortunately, instead are silently treated
34231   as 'x'.  The following induces an error, until -std is added to get
34232   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34233   array size at least.  It's necessary to write '\x00'==0 to get something
34234   that's true only with -std.  */
34235int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34236
34237/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34238   inside strings and character constants.  */
34239#define FOO(x) 'x'
34240int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34241
34242int test (int i, double x);
34243struct s1 {int (*f) (int a);};
34244struct s2 {int (*f) (double a);};
34245int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34246int argc;
34247char **argv;
34248int
34249main ()
34250{
34251return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34252  ;
34253  return 0;
34254}
34255_ACEOF
34256for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34257	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34258do
34259  CC="$ac_save_CC $ac_arg"
34260  if ac_fn_c_try_compile "$LINENO"; then :
34261  ac_cv_prog_cc_c89=$ac_arg
34262fi
34263rm -f core conftest.err conftest.$ac_objext
34264  test "x$ac_cv_prog_cc_c89" != "xno" && break
34265done
34266rm -f conftest.$ac_ext
34267CC=$ac_save_CC
34268
34269fi
34270# AC_CACHE_VAL
34271case "x$ac_cv_prog_cc_c89" in
34272  x)
34273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34274$as_echo "none needed" >&6; } ;;
34275  xno)
34276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34277$as_echo "unsupported" >&6; } ;;
34278  *)
34279    CC="$CC $ac_cv_prog_cc_c89"
34280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34281$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34282esac
34283if test "x$ac_cv_prog_cc_c89" != xno; then :
34284
34285fi
34286
34287ac_ext=cpp
34288ac_cpp='$CXXCPP $CPPFLAGS'
34289ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34290ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34291ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34292
34293
34294
34295  COMPILER_NAME=C++
34296  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34297
34298  if test "x$CXX" != x; then
34299    # User has supplied compiler name already, always let that override.
34300    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34301$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34302    if test "x`basename $CXX`" = "x$CXX"; then
34303      # A command without a complete path is provided, search $PATH.
34304
34305      for ac_prog in $CXX
34306do
34307  # Extract the first word of "$ac_prog", so it can be a program name with args.
34308set dummy $ac_prog; ac_word=$2
34309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34310$as_echo_n "checking for $ac_word... " >&6; }
34311if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34312  $as_echo_n "(cached) " >&6
34313else
34314  case $POTENTIAL_CXX in
34315  [\\/]* | ?:[\\/]*)
34316  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34317  ;;
34318  *)
34319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34320for as_dir in $PATH
34321do
34322  IFS=$as_save_IFS
34323  test -z "$as_dir" && as_dir=.
34324    for ac_exec_ext in '' $ac_executable_extensions; do
34325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34326    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34328    break 2
34329  fi
34330done
34331  done
34332IFS=$as_save_IFS
34333
34334  ;;
34335esac
34336fi
34337POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34338if test -n "$POTENTIAL_CXX"; then
34339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34340$as_echo "$POTENTIAL_CXX" >&6; }
34341else
34342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34343$as_echo "no" >&6; }
34344fi
34345
34346
34347  test -n "$POTENTIAL_CXX" && break
34348done
34349
34350      if test "x$POTENTIAL_CXX" != x; then
34351        CXX=$POTENTIAL_CXX
34352      else
34353        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34354      fi
34355    else
34356      # Otherwise it might already be a complete path
34357      if test ! -x "$CXX"; then
34358        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34359      fi
34360    fi
34361  else
34362    # No user supplied value. Locate compiler ourselves.
34363
34364    # If we are cross compiling, assume cross compilation tools follows the
34365    # cross compilation standard where they are prefixed with the autoconf
34366    # standard name for the target. For example the binary
34367    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34368    # If we are not cross compiling, then the default compiler name will be
34369    # used.
34370
34371    CXX=
34372    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34373    # before checking the rest of the PATH.
34374    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34375    # step, this should not be necessary.
34376    if test -n "$TOOLCHAIN_PATH"; then
34377      PATH_save="$PATH"
34378      PATH="$TOOLCHAIN_PATH"
34379      for ac_prog in $SEARCH_LIST
34380do
34381  # Extract the first word of "$ac_prog", so it can be a program name with args.
34382set dummy $ac_prog; ac_word=$2
34383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34384$as_echo_n "checking for $ac_word... " >&6; }
34385if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34386  $as_echo_n "(cached) " >&6
34387else
34388  case $TOOLCHAIN_PATH_CXX in
34389  [\\/]* | ?:[\\/]*)
34390  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34391  ;;
34392  *)
34393  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34394for as_dir in $PATH
34395do
34396  IFS=$as_save_IFS
34397  test -z "$as_dir" && as_dir=.
34398    for ac_exec_ext in '' $ac_executable_extensions; do
34399  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34400    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34401    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34402    break 2
34403  fi
34404done
34405  done
34406IFS=$as_save_IFS
34407
34408  ;;
34409esac
34410fi
34411TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34412if test -n "$TOOLCHAIN_PATH_CXX"; then
34413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34414$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34415else
34416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34417$as_echo "no" >&6; }
34418fi
34419
34420
34421  test -n "$TOOLCHAIN_PATH_CXX" && break
34422done
34423
34424      CXX=$TOOLCHAIN_PATH_CXX
34425      PATH="$PATH_save"
34426    fi
34427
34428    # AC_PATH_PROGS can't be run multiple times with the same variable,
34429    # so create a new name for this run.
34430    if test "x$CXX" = x; then
34431      for ac_prog in $SEARCH_LIST
34432do
34433  # Extract the first word of "$ac_prog", so it can be a program name with args.
34434set dummy $ac_prog; ac_word=$2
34435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34436$as_echo_n "checking for $ac_word... " >&6; }
34437if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34438  $as_echo_n "(cached) " >&6
34439else
34440  case $POTENTIAL_CXX in
34441  [\\/]* | ?:[\\/]*)
34442  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34443  ;;
34444  *)
34445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34446for as_dir in $PATH
34447do
34448  IFS=$as_save_IFS
34449  test -z "$as_dir" && as_dir=.
34450    for ac_exec_ext in '' $ac_executable_extensions; do
34451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34452    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34454    break 2
34455  fi
34456done
34457  done
34458IFS=$as_save_IFS
34459
34460  ;;
34461esac
34462fi
34463POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34464if test -n "$POTENTIAL_CXX"; then
34465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34466$as_echo "$POTENTIAL_CXX" >&6; }
34467else
34468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34469$as_echo "no" >&6; }
34470fi
34471
34472
34473  test -n "$POTENTIAL_CXX" && break
34474done
34475
34476      CXX=$POTENTIAL_CXX
34477    fi
34478
34479    if test "x$CXX" = x; then
34480
34481  # Print a helpful message on how to acquire the necessary build dependency.
34482  # devkit is the help tag: freetype, cups, alsa etc
34483  MISSING_DEPENDENCY=devkit
34484
34485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34486    cygwin_help $MISSING_DEPENDENCY
34487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34488    msys_help $MISSING_DEPENDENCY
34489  else
34490    PKGHANDLER_COMMAND=
34491
34492    case $PKGHANDLER in
34493      apt-get)
34494        apt_help     $MISSING_DEPENDENCY ;;
34495      yum)
34496        yum_help     $MISSING_DEPENDENCY ;;
34497      port)
34498        port_help    $MISSING_DEPENDENCY ;;
34499      pkgutil)
34500        pkgutil_help $MISSING_DEPENDENCY ;;
34501      pkgadd)
34502        pkgadd_help  $MISSING_DEPENDENCY ;;
34503    esac
34504
34505    if test "x$PKGHANDLER_COMMAND" != x; then
34506      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34507    fi
34508  fi
34509
34510      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34511    fi
34512  fi
34513
34514  # Now we have a compiler binary in CXX. Make sure it's okay.
34515
34516  # Only process if variable expands to non-empty
34517
34518  if test "x$CXX" != x; then
34519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34520
34521  # First separate the path from the arguments. This will split at the first
34522  # space.
34523  complete="$CXX"
34524  path="${complete%% *}"
34525  tmp="$complete EOL"
34526  arguments="${tmp#* }"
34527
34528  # Input might be given as Windows format, start by converting to
34529  # unix format.
34530  new_path=`$CYGPATH -u "$path"`
34531
34532  # Now try to locate executable using which
34533  new_path=`$WHICH "$new_path" 2> /dev/null`
34534  # bat and cmd files are not always considered executable in cygwin causing which
34535  # to not find them
34536  if test "x$new_path" = x \
34537      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34538      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34539    new_path=`$CYGPATH -u "$path"`
34540  fi
34541  if test "x$new_path" = x; then
34542    # Oops. Which didn't find the executable.
34543    # The splitting of arguments from the executable at a space might have been incorrect,
34544    # since paths with space are more likely in Windows. Give it another try with the whole
34545    # argument.
34546    path="$complete"
34547    arguments="EOL"
34548    new_path=`$CYGPATH -u "$path"`
34549    new_path=`$WHICH "$new_path" 2> /dev/null`
34550    # bat and cmd files are not always considered executable in cygwin causing which
34551    # to not find them
34552    if test "x$new_path" = x \
34553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34555      new_path=`$CYGPATH -u "$path"`
34556    fi
34557    if test "x$new_path" = x; then
34558      # It's still not found. Now this is an unrecoverable error.
34559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34560$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34561      has_space=`$ECHO "$complete" | $GREP " "`
34562      if test "x$has_space" != x; then
34563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34565      fi
34566      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34567    fi
34568  fi
34569
34570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34573  # "foo.exe" is OK but "foo" is an error.
34574  #
34575  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34576  # It is also a way to make sure we got the proper file name for the real test later on.
34577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34578  if test "x$test_shortpath" = x; then
34579    # Short path failed, file does not exist as specified.
34580    # Try adding .exe or .cmd
34581    if test -f "${new_path}.exe"; then
34582      input_to_shortpath="${new_path}.exe"
34583    elif test -f "${new_path}.cmd"; then
34584      input_to_shortpath="${new_path}.cmd"
34585    else
34586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34587$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34590      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34591    fi
34592  else
34593    input_to_shortpath="$new_path"
34594  fi
34595
34596  # Call helper function which possibly converts this using DOS-style short mode.
34597  # If so, the updated path is stored in $new_path.
34598  new_path="$input_to_shortpath"
34599
34600  input_path="$input_to_shortpath"
34601  # Check if we need to convert this using DOS-style short mode. If the path
34602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34603  # take no chances and rewrite it.
34604  # Note: m4 eats our [], so we need to use [ and ] instead.
34605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34606  if test "x$has_forbidden_chars" != x; then
34607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34611      # Going to short mode and back again did indeed matter. Since short mode is
34612      # case insensitive, let's make it lowercase to improve readability.
34613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34614      # Now convert it back to Unix-style (cygpath)
34615      input_path=`$CYGPATH -u "$shortmode_path"`
34616      new_path="$input_path"
34617    fi
34618  fi
34619
34620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34621  if test "x$test_cygdrive_prefix" = x; then
34622    # As a simple fix, exclude /usr/bin since it's not a real path.
34623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34625      # a path prefixed by /cygdrive for fixpath to work.
34626      new_path="$CYGWIN_ROOT_PATH$input_path"
34627    fi
34628  fi
34629
34630  # remove trailing .exe if any
34631  new_path="${new_path/%.exe/}"
34632
34633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34634
34635  # First separate the path from the arguments. This will split at the first
34636  # space.
34637  complete="$CXX"
34638  path="${complete%% *}"
34639  tmp="$complete EOL"
34640  arguments="${tmp#* }"
34641
34642  # Input might be given as Windows format, start by converting to
34643  # unix format.
34644  new_path="$path"
34645
34646  windows_path="$new_path"
34647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34648    unix_path=`$CYGPATH -u "$windows_path"`
34649    new_path="$unix_path"
34650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34652    new_path="$unix_path"
34653  fi
34654
34655
34656  # Now try to locate executable using which
34657  new_path=`$WHICH "$new_path" 2> /dev/null`
34658
34659  if test "x$new_path" = x; then
34660    # Oops. Which didn't find the executable.
34661    # The splitting of arguments from the executable at a space might have been incorrect,
34662    # since paths with space are more likely in Windows. Give it another try with the whole
34663    # argument.
34664    path="$complete"
34665    arguments="EOL"
34666    new_path="$path"
34667
34668  windows_path="$new_path"
34669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34670    unix_path=`$CYGPATH -u "$windows_path"`
34671    new_path="$unix_path"
34672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34674    new_path="$unix_path"
34675  fi
34676
34677
34678    new_path=`$WHICH "$new_path" 2> /dev/null`
34679    # bat and cmd files are not always considered executable in MSYS causing which
34680    # to not find them
34681    if test "x$new_path" = x \
34682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34684      new_path="$path"
34685
34686  windows_path="$new_path"
34687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34688    unix_path=`$CYGPATH -u "$windows_path"`
34689    new_path="$unix_path"
34690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34692    new_path="$unix_path"
34693  fi
34694
34695    fi
34696
34697    if test "x$new_path" = x; then
34698      # It's still not found. Now this is an unrecoverable error.
34699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34700$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34701      has_space=`$ECHO "$complete" | $GREP " "`
34702      if test "x$has_space" != x; then
34703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34705      fi
34706      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34707    fi
34708  fi
34709
34710  # Now new_path has a complete unix path to the binary
34711  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34712    # Keep paths in /bin as-is, but remove trailing .exe if any
34713    new_path="${new_path/%.exe/}"
34714    # Do not save /bin paths to all_fixpath_prefixes!
34715  else
34716    # Not in mixed or Windows style, start by that.
34717    new_path=`cmd //c echo $new_path`
34718
34719  input_path="$new_path"
34720  # Check if we need to convert this using DOS-style short mode. If the path
34721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34722  # take no chances and rewrite it.
34723  # Note: m4 eats our [], so we need to use [ and ] instead.
34724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34725  if test "x$has_forbidden_chars" != x; then
34726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34728  fi
34729
34730    # Output is in $new_path
34731
34732  windows_path="$new_path"
34733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34734    unix_path=`$CYGPATH -u "$windows_path"`
34735    new_path="$unix_path"
34736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34738    new_path="$unix_path"
34739  fi
34740
34741    # remove trailing .exe if any
34742    new_path="${new_path/%.exe/}"
34743
34744    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34745    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34746  fi
34747
34748    else
34749      # We're on a unix platform. Hooray! :)
34750      # First separate the path from the arguments. This will split at the first
34751      # space.
34752      complete="$CXX"
34753      path="${complete%% *}"
34754      tmp="$complete EOL"
34755      arguments="${tmp#* }"
34756
34757      # Cannot rely on the command "which" here since it doesn't always work.
34758      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34759      if test -z "$is_absolute_path"; then
34760        # Path to executable is not absolute. Find it.
34761        IFS_save="$IFS"
34762        IFS=:
34763        for p in $PATH; do
34764          if test -f "$p/$path" && test -x "$p/$path"; then
34765            new_path="$p/$path"
34766            break
34767          fi
34768        done
34769        IFS="$IFS_save"
34770      else
34771        # This is an absolute path, we can use it without further modifications.
34772        new_path="$path"
34773      fi
34774
34775      if test "x$new_path" = x; then
34776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34777$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34778        has_space=`$ECHO "$complete" | $GREP " "`
34779        if test "x$has_space" != x; then
34780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34782        fi
34783        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34784      fi
34785    fi
34786
34787    # Now join together the path and the arguments once again
34788    if test "x$arguments" != xEOL; then
34789      new_complete="$new_path ${arguments% *}"
34790    else
34791      new_complete="$new_path"
34792    fi
34793
34794    if test "x$complete" != "x$new_complete"; then
34795      CXX="$new_complete"
34796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34797$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34798    fi
34799  fi
34800
34801  TEST_COMPILER="$CXX"
34802
34803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34804$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34805  SYMLINK_ORIGINAL="$TEST_COMPILER"
34806
34807  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34808    # Follow a chain of symbolic links. Use readlink
34809    # where it exists, else fall back to horribly
34810    # complicated shell code.
34811    if test "x$READLINK_TESTED" != yes; then
34812      # On MacOSX there is a readlink tool with a different
34813      # purpose than the GNU readlink tool. Check the found readlink.
34814      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34815      if test "x$ISGNU" = x; then
34816        # A readlink that we do not know how to use.
34817        # Are there other non-GNU readlinks out there?
34818        READLINK_TESTED=yes
34819        READLINK=
34820      fi
34821    fi
34822
34823    if test "x$READLINK" != x; then
34824      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34825    else
34826      # Save the current directory for restoring afterwards
34827      STARTDIR=$PWD
34828      COUNTER=0
34829      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34830      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34831      cd $sym_link_dir
34832      # Use -P flag to resolve symlinks in directories.
34833      cd `$THEPWDCMD -P`
34834      sym_link_dir=`$THEPWDCMD -P`
34835      # Resolve file symlinks
34836      while test $COUNTER -lt 20; do
34837        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34838        if test "x$ISLINK" == x; then
34839          # This is not a symbolic link! We are done!
34840          break
34841        fi
34842        # Again resolve directory symlinks since the target of the just found
34843        # link could be in a different directory
34844        cd `$DIRNAME $ISLINK`
34845        sym_link_dir=`$THEPWDCMD -P`
34846        sym_link_file=`$BASENAME $ISLINK`
34847        let COUNTER=COUNTER+1
34848      done
34849      cd $STARTDIR
34850      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34851    fi
34852  fi
34853
34854  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34855    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34856$as_echo "no symlink" >&6; }
34857  else
34858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34859$as_echo "$SYMLINK_ORIGINAL" >&6; }
34860
34861    # We can't handle ccache by gcc wrappers, since we need to know if we're
34862    # using ccache. Instead ccache usage must be controlled by a configure option.
34863    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34864    if test "x$COMPILER_BASENAME" = "xccache"; then
34865      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34866$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34867      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34868    fi
34869  fi
34870
34871
34872  COMPILER=$CXX
34873  COMPILER_NAME=$COMPILER_NAME
34874
34875  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34876    # cc -V output typically looks like
34877    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34878    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34879    # Check that this is likely to be the Solaris Studio cc.
34880    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34881    if test $? -ne 0; then
34882      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34883      { $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
34884$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34885      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34886$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34887      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34888$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34889      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34890    fi
34891    # Remove usage instructions (if present), and
34892    # collapse compiler output into a single line
34893    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34894        $SED -e 's/ *[Uu]sage:.*//'`
34895    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34896        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34897  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34898    # xlc -qversion output typically looks like
34899    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34900    #     Version: 11.01.0000.0015
34901    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34902    # Check that this is likely to be the IBM XL C compiler.
34903    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34904    if test $? -ne 0; then
34905      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34906      { $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
34907$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34908      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34909$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34910      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34911$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34912      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34913    fi
34914    # Collapse compiler output into a single line
34915    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34916    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34917        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34918  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34919    # There is no specific version flag, but all output starts with a version string.
34920    # First line typically looks something like:
34921    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34922    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34923    # Check that this is likely to be Microsoft CL.EXE.
34924    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34925    if test $? -ne 0; then
34926      { $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
34927$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34928      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34929$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34930      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34931    fi
34932    # Collapse compiler output into a single line
34933    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34934    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34935        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34936  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34937    # gcc --version output typically looks like
34938    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34939    #     Copyright (C) 2013 Free Software Foundation, Inc.
34940    #     This is free software; see the source for copying conditions.  There is NO
34941    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34942    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34943    # Check that this is likely to be GCC.
34944    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34945    if test $? -ne 0; then
34946      { $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
34947$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34948      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34949$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34950      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34951    fi
34952    # Remove Copyright and legalese from version string, and
34953    # collapse into a single line
34954    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34955        $SED -e 's/ *Copyright .*//'`
34956    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34957        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34958  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34959    # clang --version output typically looks like
34960    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34961    #    clang version 3.3 (tags/RELEASE_33/final)
34962    # or
34963    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34964    #    Target: x86_64-pc-linux-gnu
34965    #    Thread model: posix
34966    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34967    # Check that this is likely to be clang
34968    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34969    if test $? -ne 0; then
34970      { $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
34971$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34973$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34975    fi
34976    # Collapse compiler output into a single line
34977    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34978    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34979        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34980  else
34981      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34982  fi
34983  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34984  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34985  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34986  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34987
34988  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34989$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34990
34991
34992  # Now that we have resolved CXX ourself, let autoconf have its go at it
34993  ac_ext=cpp
34994ac_cpp='$CXXCPP $CPPFLAGS'
34995ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34996ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34997ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34998if test -z "$CXX"; then
34999  if test -n "$CCC"; then
35000    CXX=$CCC
35001  else
35002    if test -n "$ac_tool_prefix"; then
35003  for ac_prog in $CXX
35004  do
35005    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35006set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35008$as_echo_n "checking for $ac_word... " >&6; }
35009if ${ac_cv_prog_CXX+:} false; then :
35010  $as_echo_n "(cached) " >&6
35011else
35012  if test -n "$CXX"; then
35013  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35014else
35015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35016for as_dir in $PATH
35017do
35018  IFS=$as_save_IFS
35019  test -z "$as_dir" && as_dir=.
35020    for ac_exec_ext in '' $ac_executable_extensions; do
35021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35022    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35024    break 2
35025  fi
35026done
35027  done
35028IFS=$as_save_IFS
35029
35030fi
35031fi
35032CXX=$ac_cv_prog_CXX
35033if test -n "$CXX"; then
35034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35035$as_echo "$CXX" >&6; }
35036else
35037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35038$as_echo "no" >&6; }
35039fi
35040
35041
35042    test -n "$CXX" && break
35043  done
35044fi
35045if test -z "$CXX"; then
35046  ac_ct_CXX=$CXX
35047  for ac_prog in $CXX
35048do
35049  # Extract the first word of "$ac_prog", so it can be a program name with args.
35050set dummy $ac_prog; ac_word=$2
35051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35052$as_echo_n "checking for $ac_word... " >&6; }
35053if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35054  $as_echo_n "(cached) " >&6
35055else
35056  if test -n "$ac_ct_CXX"; then
35057  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35058else
35059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35060for as_dir in $PATH
35061do
35062  IFS=$as_save_IFS
35063  test -z "$as_dir" && as_dir=.
35064    for ac_exec_ext in '' $ac_executable_extensions; do
35065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35066    ac_cv_prog_ac_ct_CXX="$ac_prog"
35067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35068    break 2
35069  fi
35070done
35071  done
35072IFS=$as_save_IFS
35073
35074fi
35075fi
35076ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35077if test -n "$ac_ct_CXX"; then
35078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35079$as_echo "$ac_ct_CXX" >&6; }
35080else
35081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35082$as_echo "no" >&6; }
35083fi
35084
35085
35086  test -n "$ac_ct_CXX" && break
35087done
35088
35089  if test "x$ac_ct_CXX" = x; then
35090    CXX="g++"
35091  else
35092    case $cross_compiling:$ac_tool_warned in
35093yes:)
35094{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35095$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35096ac_tool_warned=yes ;;
35097esac
35098    CXX=$ac_ct_CXX
35099  fi
35100fi
35101
35102  fi
35103fi
35104# Provide some information about the compiler.
35105$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35106set X $ac_compile
35107ac_compiler=$2
35108for ac_option in --version -v -V -qversion; do
35109  { { ac_try="$ac_compiler $ac_option >&5"
35110case "(($ac_try" in
35111  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35112  *) ac_try_echo=$ac_try;;
35113esac
35114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35115$as_echo "$ac_try_echo"; } >&5
35116  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35117  ac_status=$?
35118  if test -s conftest.err; then
35119    sed '10a\
35120... rest of stderr output deleted ...
35121         10q' conftest.err >conftest.er1
35122    cat conftest.er1 >&5
35123  fi
35124  rm -f conftest.er1 conftest.err
35125  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35126  test $ac_status = 0; }
35127done
35128
35129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35130$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35131if ${ac_cv_cxx_compiler_gnu+:} false; then :
35132  $as_echo_n "(cached) " >&6
35133else
35134  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35135/* end confdefs.h.  */
35136
35137int
35138main ()
35139{
35140#ifndef __GNUC__
35141       choke me
35142#endif
35143
35144  ;
35145  return 0;
35146}
35147_ACEOF
35148if ac_fn_cxx_try_compile "$LINENO"; then :
35149  ac_compiler_gnu=yes
35150else
35151  ac_compiler_gnu=no
35152fi
35153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35154ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35155
35156fi
35157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35158$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35159if test $ac_compiler_gnu = yes; then
35160  GXX=yes
35161else
35162  GXX=
35163fi
35164ac_test_CXXFLAGS=${CXXFLAGS+set}
35165ac_save_CXXFLAGS=$CXXFLAGS
35166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35167$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35168if ${ac_cv_prog_cxx_g+:} false; then :
35169  $as_echo_n "(cached) " >&6
35170else
35171  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35172   ac_cxx_werror_flag=yes
35173   ac_cv_prog_cxx_g=no
35174   CXXFLAGS="-g"
35175   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35176/* end confdefs.h.  */
35177
35178int
35179main ()
35180{
35181
35182  ;
35183  return 0;
35184}
35185_ACEOF
35186if ac_fn_cxx_try_compile "$LINENO"; then :
35187  ac_cv_prog_cxx_g=yes
35188else
35189  CXXFLAGS=""
35190      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35191/* end confdefs.h.  */
35192
35193int
35194main ()
35195{
35196
35197  ;
35198  return 0;
35199}
35200_ACEOF
35201if ac_fn_cxx_try_compile "$LINENO"; then :
35202
35203else
35204  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35205	 CXXFLAGS="-g"
35206	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35207/* end confdefs.h.  */
35208
35209int
35210main ()
35211{
35212
35213  ;
35214  return 0;
35215}
35216_ACEOF
35217if ac_fn_cxx_try_compile "$LINENO"; then :
35218  ac_cv_prog_cxx_g=yes
35219fi
35220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35221fi
35222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35223fi
35224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35225   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35226fi
35227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35228$as_echo "$ac_cv_prog_cxx_g" >&6; }
35229if test "$ac_test_CXXFLAGS" = set; then
35230  CXXFLAGS=$ac_save_CXXFLAGS
35231elif test $ac_cv_prog_cxx_g = yes; then
35232  if test "$GXX" = yes; then
35233    CXXFLAGS="-g -O2"
35234  else
35235    CXXFLAGS="-g"
35236  fi
35237else
35238  if test "$GXX" = yes; then
35239    CXXFLAGS="-O2"
35240  else
35241    CXXFLAGS=
35242  fi
35243fi
35244ac_ext=cpp
35245ac_cpp='$CXXCPP $CPPFLAGS'
35246ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35247ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35248ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35249
35250
35251  # This is the compiler version number on the form X.Y[.Z]
35252
35253
35254
35255
35256  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35257    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35258$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35259    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35260$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35261  fi
35262
35263  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35264  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35265    { $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
35266$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;}
35267  fi
35268
35269  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35270    { $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
35271$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35272  fi
35273
35274  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35275
35276
35277  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
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    # Execute function body
35328
35329  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35330  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35331
35332  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35333    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35334  fi
35335
35336  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35337    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35338  fi
35339
35340  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35341  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35342
35343  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35344    :
35345
35346  else
35347    :
35348
35349          { $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
35350$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35351
35352
35353  fi
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368  fi
35369
35370  #
35371  # Setup the preprocessor (CPP and CXXCPP)
35372  #
35373  ac_ext=c
35374ac_cpp='$CPP $CPPFLAGS'
35375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35377ac_compiler_gnu=$ac_cv_c_compiler_gnu
35378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35379$as_echo_n "checking how to run the C preprocessor... " >&6; }
35380# On Suns, sometimes $CPP names a directory.
35381if test -n "$CPP" && test -d "$CPP"; then
35382  CPP=
35383fi
35384if test -z "$CPP"; then
35385  if ${ac_cv_prog_CPP+:} false; then :
35386  $as_echo_n "(cached) " >&6
35387else
35388      # Double quotes because CPP needs to be expanded
35389    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35390    do
35391      ac_preproc_ok=false
35392for ac_c_preproc_warn_flag in '' yes
35393do
35394  # Use a header file that comes with gcc, so configuring glibc
35395  # with a fresh cross-compiler works.
35396  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35397  # <limits.h> exists even on freestanding compilers.
35398  # On the NeXT, cc -E runs the code through the compiler's parser,
35399  # not just through cpp. "Syntax error" is here to catch this case.
35400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35401/* end confdefs.h.  */
35402#ifdef __STDC__
35403# include <limits.h>
35404#else
35405# include <assert.h>
35406#endif
35407		     Syntax error
35408_ACEOF
35409if ac_fn_c_try_cpp "$LINENO"; then :
35410
35411else
35412  # Broken: fails on valid input.
35413continue
35414fi
35415rm -f conftest.err conftest.i conftest.$ac_ext
35416
35417  # OK, works on sane cases.  Now check whether nonexistent headers
35418  # can be detected and how.
35419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35420/* end confdefs.h.  */
35421#include <ac_nonexistent.h>
35422_ACEOF
35423if ac_fn_c_try_cpp "$LINENO"; then :
35424  # Broken: success on invalid input.
35425continue
35426else
35427  # Passes both tests.
35428ac_preproc_ok=:
35429break
35430fi
35431rm -f conftest.err conftest.i conftest.$ac_ext
35432
35433done
35434# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35435rm -f conftest.i conftest.err conftest.$ac_ext
35436if $ac_preproc_ok; then :
35437  break
35438fi
35439
35440    done
35441    ac_cv_prog_CPP=$CPP
35442
35443fi
35444  CPP=$ac_cv_prog_CPP
35445else
35446  ac_cv_prog_CPP=$CPP
35447fi
35448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35449$as_echo "$CPP" >&6; }
35450ac_preproc_ok=false
35451for ac_c_preproc_warn_flag in '' yes
35452do
35453  # Use a header file that comes with gcc, so configuring glibc
35454  # with a fresh cross-compiler works.
35455  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35456  # <limits.h> exists even on freestanding compilers.
35457  # On the NeXT, cc -E runs the code through the compiler's parser,
35458  # not just through cpp. "Syntax error" is here to catch this case.
35459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35460/* end confdefs.h.  */
35461#ifdef __STDC__
35462# include <limits.h>
35463#else
35464# include <assert.h>
35465#endif
35466		     Syntax error
35467_ACEOF
35468if ac_fn_c_try_cpp "$LINENO"; then :
35469
35470else
35471  # Broken: fails on valid input.
35472continue
35473fi
35474rm -f conftest.err conftest.i conftest.$ac_ext
35475
35476  # OK, works on sane cases.  Now check whether nonexistent headers
35477  # can be detected and how.
35478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35479/* end confdefs.h.  */
35480#include <ac_nonexistent.h>
35481_ACEOF
35482if ac_fn_c_try_cpp "$LINENO"; then :
35483  # Broken: success on invalid input.
35484continue
35485else
35486  # Passes both tests.
35487ac_preproc_ok=:
35488break
35489fi
35490rm -f conftest.err conftest.i conftest.$ac_ext
35491
35492done
35493# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35494rm -f conftest.i conftest.err conftest.$ac_ext
35495if $ac_preproc_ok; then :
35496
35497else
35498  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35499$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35500as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35501See \`config.log' for more details" "$LINENO" 5; }
35502fi
35503
35504ac_ext=cpp
35505ac_cpp='$CXXCPP $CPPFLAGS'
35506ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35507ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35508ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35509
35510
35511  # Only process if variable expands to non-empty
35512
35513  if test "x$CPP" != x; then
35514    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35515
35516  # First separate the path from the arguments. This will split at the first
35517  # space.
35518  complete="$CPP"
35519  path="${complete%% *}"
35520  tmp="$complete EOL"
35521  arguments="${tmp#* }"
35522
35523  # Input might be given as Windows format, start by converting to
35524  # unix format.
35525  new_path=`$CYGPATH -u "$path"`
35526
35527  # Now try to locate executable using which
35528  new_path=`$WHICH "$new_path" 2> /dev/null`
35529  # bat and cmd files are not always considered executable in cygwin causing which
35530  # to not find them
35531  if test "x$new_path" = x \
35532      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35533      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35534    new_path=`$CYGPATH -u "$path"`
35535  fi
35536  if test "x$new_path" = x; then
35537    # Oops. Which didn't find the executable.
35538    # The splitting of arguments from the executable at a space might have been incorrect,
35539    # since paths with space are more likely in Windows. Give it another try with the whole
35540    # argument.
35541    path="$complete"
35542    arguments="EOL"
35543    new_path=`$CYGPATH -u "$path"`
35544    new_path=`$WHICH "$new_path" 2> /dev/null`
35545    # bat and cmd files are not always considered executable in cygwin causing which
35546    # to not find them
35547    if test "x$new_path" = x \
35548        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35549        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35550      new_path=`$CYGPATH -u "$path"`
35551    fi
35552    if test "x$new_path" = x; then
35553      # It's still not found. Now this is an unrecoverable error.
35554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35555$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35556      has_space=`$ECHO "$complete" | $GREP " "`
35557      if test "x$has_space" != x; then
35558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35560      fi
35561      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35562    fi
35563  fi
35564
35565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35568  # "foo.exe" is OK but "foo" is an error.
35569  #
35570  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35571  # It is also a way to make sure we got the proper file name for the real test later on.
35572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35573  if test "x$test_shortpath" = x; then
35574    # Short path failed, file does not exist as specified.
35575    # Try adding .exe or .cmd
35576    if test -f "${new_path}.exe"; then
35577      input_to_shortpath="${new_path}.exe"
35578    elif test -f "${new_path}.cmd"; then
35579      input_to_shortpath="${new_path}.cmd"
35580    else
35581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35582$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35583      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35584$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35585      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35586    fi
35587  else
35588    input_to_shortpath="$new_path"
35589  fi
35590
35591  # Call helper function which possibly converts this using DOS-style short mode.
35592  # If so, the updated path is stored in $new_path.
35593  new_path="$input_to_shortpath"
35594
35595  input_path="$input_to_shortpath"
35596  # Check if we need to convert this using DOS-style short mode. If the path
35597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35598  # take no chances and rewrite it.
35599  # Note: m4 eats our [], so we need to use [ and ] instead.
35600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35601  if test "x$has_forbidden_chars" != x; then
35602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35606      # Going to short mode and back again did indeed matter. Since short mode is
35607      # case insensitive, let's make it lowercase to improve readability.
35608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35609      # Now convert it back to Unix-style (cygpath)
35610      input_path=`$CYGPATH -u "$shortmode_path"`
35611      new_path="$input_path"
35612    fi
35613  fi
35614
35615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35616  if test "x$test_cygdrive_prefix" = x; then
35617    # As a simple fix, exclude /usr/bin since it's not a real path.
35618    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35620      # a path prefixed by /cygdrive for fixpath to work.
35621      new_path="$CYGWIN_ROOT_PATH$input_path"
35622    fi
35623  fi
35624
35625  # remove trailing .exe if any
35626  new_path="${new_path/%.exe/}"
35627
35628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35629
35630  # First separate the path from the arguments. This will split at the first
35631  # space.
35632  complete="$CPP"
35633  path="${complete%% *}"
35634  tmp="$complete EOL"
35635  arguments="${tmp#* }"
35636
35637  # Input might be given as Windows format, start by converting to
35638  # unix format.
35639  new_path="$path"
35640
35641  windows_path="$new_path"
35642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35643    unix_path=`$CYGPATH -u "$windows_path"`
35644    new_path="$unix_path"
35645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35647    new_path="$unix_path"
35648  fi
35649
35650
35651  # Now try to locate executable using which
35652  new_path=`$WHICH "$new_path" 2> /dev/null`
35653
35654  if test "x$new_path" = x; then
35655    # Oops. Which didn't find the executable.
35656    # The splitting of arguments from the executable at a space might have been incorrect,
35657    # since paths with space are more likely in Windows. Give it another try with the whole
35658    # argument.
35659    path="$complete"
35660    arguments="EOL"
35661    new_path="$path"
35662
35663  windows_path="$new_path"
35664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665    unix_path=`$CYGPATH -u "$windows_path"`
35666    new_path="$unix_path"
35667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669    new_path="$unix_path"
35670  fi
35671
35672
35673    new_path=`$WHICH "$new_path" 2> /dev/null`
35674    # bat and cmd files are not always considered executable in MSYS causing which
35675    # to not find them
35676    if test "x$new_path" = x \
35677        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35678        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35679      new_path="$path"
35680
35681  windows_path="$new_path"
35682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35683    unix_path=`$CYGPATH -u "$windows_path"`
35684    new_path="$unix_path"
35685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35687    new_path="$unix_path"
35688  fi
35689
35690    fi
35691
35692    if test "x$new_path" = x; then
35693      # It's still not found. Now this is an unrecoverable error.
35694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35695$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35696      has_space=`$ECHO "$complete" | $GREP " "`
35697      if test "x$has_space" != x; then
35698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35700      fi
35701      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35702    fi
35703  fi
35704
35705  # Now new_path has a complete unix path to the binary
35706  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35707    # Keep paths in /bin as-is, but remove trailing .exe if any
35708    new_path="${new_path/%.exe/}"
35709    # Do not save /bin paths to all_fixpath_prefixes!
35710  else
35711    # Not in mixed or Windows style, start by that.
35712    new_path=`cmd //c echo $new_path`
35713
35714  input_path="$new_path"
35715  # Check if we need to convert this using DOS-style short mode. If the path
35716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35717  # take no chances and rewrite it.
35718  # Note: m4 eats our [], so we need to use [ and ] instead.
35719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35720  if test "x$has_forbidden_chars" != x; then
35721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35722    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35723  fi
35724
35725    # Output is in $new_path
35726
35727  windows_path="$new_path"
35728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35729    unix_path=`$CYGPATH -u "$windows_path"`
35730    new_path="$unix_path"
35731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35733    new_path="$unix_path"
35734  fi
35735
35736    # remove trailing .exe if any
35737    new_path="${new_path/%.exe/}"
35738
35739    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35740    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35741  fi
35742
35743    else
35744      # We're on a unix platform. Hooray! :)
35745      # First separate the path from the arguments. This will split at the first
35746      # space.
35747      complete="$CPP"
35748      path="${complete%% *}"
35749      tmp="$complete EOL"
35750      arguments="${tmp#* }"
35751
35752      # Cannot rely on the command "which" here since it doesn't always work.
35753      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35754      if test -z "$is_absolute_path"; then
35755        # Path to executable is not absolute. Find it.
35756        IFS_save="$IFS"
35757        IFS=:
35758        for p in $PATH; do
35759          if test -f "$p/$path" && test -x "$p/$path"; then
35760            new_path="$p/$path"
35761            break
35762          fi
35763        done
35764        IFS="$IFS_save"
35765      else
35766        # This is an absolute path, we can use it without further modifications.
35767        new_path="$path"
35768      fi
35769
35770      if test "x$new_path" = x; then
35771        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35772$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35773        has_space=`$ECHO "$complete" | $GREP " "`
35774        if test "x$has_space" != x; then
35775          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35776$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35777        fi
35778        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35779      fi
35780    fi
35781
35782    # Now join together the path and the arguments once again
35783    if test "x$arguments" != xEOL; then
35784      new_complete="$new_path ${arguments% *}"
35785    else
35786      new_complete="$new_path"
35787    fi
35788
35789    if test "x$complete" != "x$new_complete"; then
35790      CPP="$new_complete"
35791      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35792$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35793    fi
35794  fi
35795
35796  ac_ext=cpp
35797ac_cpp='$CXXCPP $CPPFLAGS'
35798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35802$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35803if test -z "$CXXCPP"; then
35804  if ${ac_cv_prog_CXXCPP+:} false; then :
35805  $as_echo_n "(cached) " >&6
35806else
35807      # Double quotes because CXXCPP needs to be expanded
35808    for CXXCPP in "$CXX -E" "/lib/cpp"
35809    do
35810      ac_preproc_ok=false
35811for ac_cxx_preproc_warn_flag in '' yes
35812do
35813  # Use a header file that comes with gcc, so configuring glibc
35814  # with a fresh cross-compiler works.
35815  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35816  # <limits.h> exists even on freestanding compilers.
35817  # On the NeXT, cc -E runs the code through the compiler's parser,
35818  # not just through cpp. "Syntax error" is here to catch this case.
35819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35820/* end confdefs.h.  */
35821#ifdef __STDC__
35822# include <limits.h>
35823#else
35824# include <assert.h>
35825#endif
35826		     Syntax error
35827_ACEOF
35828if ac_fn_cxx_try_cpp "$LINENO"; then :
35829
35830else
35831  # Broken: fails on valid input.
35832continue
35833fi
35834rm -f conftest.err conftest.i conftest.$ac_ext
35835
35836  # OK, works on sane cases.  Now check whether nonexistent headers
35837  # can be detected and how.
35838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35839/* end confdefs.h.  */
35840#include <ac_nonexistent.h>
35841_ACEOF
35842if ac_fn_cxx_try_cpp "$LINENO"; then :
35843  # Broken: success on invalid input.
35844continue
35845else
35846  # Passes both tests.
35847ac_preproc_ok=:
35848break
35849fi
35850rm -f conftest.err conftest.i conftest.$ac_ext
35851
35852done
35853# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35854rm -f conftest.i conftest.err conftest.$ac_ext
35855if $ac_preproc_ok; then :
35856  break
35857fi
35858
35859    done
35860    ac_cv_prog_CXXCPP=$CXXCPP
35861
35862fi
35863  CXXCPP=$ac_cv_prog_CXXCPP
35864else
35865  ac_cv_prog_CXXCPP=$CXXCPP
35866fi
35867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35868$as_echo "$CXXCPP" >&6; }
35869ac_preproc_ok=false
35870for ac_cxx_preproc_warn_flag in '' yes
35871do
35872  # Use a header file that comes with gcc, so configuring glibc
35873  # with a fresh cross-compiler works.
35874  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35875  # <limits.h> exists even on freestanding compilers.
35876  # On the NeXT, cc -E runs the code through the compiler's parser,
35877  # not just through cpp. "Syntax error" is here to catch this case.
35878  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35879/* end confdefs.h.  */
35880#ifdef __STDC__
35881# include <limits.h>
35882#else
35883# include <assert.h>
35884#endif
35885		     Syntax error
35886_ACEOF
35887if ac_fn_cxx_try_cpp "$LINENO"; then :
35888
35889else
35890  # Broken: fails on valid input.
35891continue
35892fi
35893rm -f conftest.err conftest.i conftest.$ac_ext
35894
35895  # OK, works on sane cases.  Now check whether nonexistent headers
35896  # can be detected and how.
35897  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35898/* end confdefs.h.  */
35899#include <ac_nonexistent.h>
35900_ACEOF
35901if ac_fn_cxx_try_cpp "$LINENO"; then :
35902  # Broken: success on invalid input.
35903continue
35904else
35905  # Passes both tests.
35906ac_preproc_ok=:
35907break
35908fi
35909rm -f conftest.err conftest.i conftest.$ac_ext
35910
35911done
35912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35913rm -f conftest.i conftest.err conftest.$ac_ext
35914if $ac_preproc_ok; then :
35915
35916else
35917  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35919as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35920See \`config.log' for more details" "$LINENO" 5; }
35921fi
35922
35923ac_ext=cpp
35924ac_cpp='$CXXCPP $CPPFLAGS'
35925ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35926ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35927ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35928
35929
35930  # Only process if variable expands to non-empty
35931
35932  if test "x$CXXCPP" != x; then
35933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35934
35935  # First separate the path from the arguments. This will split at the first
35936  # space.
35937  complete="$CXXCPP"
35938  path="${complete%% *}"
35939  tmp="$complete EOL"
35940  arguments="${tmp#* }"
35941
35942  # Input might be given as Windows format, start by converting to
35943  # unix format.
35944  new_path=`$CYGPATH -u "$path"`
35945
35946  # Now try to locate executable using which
35947  new_path=`$WHICH "$new_path" 2> /dev/null`
35948  # bat and cmd files are not always considered executable in cygwin causing which
35949  # to not find them
35950  if test "x$new_path" = x \
35951      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35952      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35953    new_path=`$CYGPATH -u "$path"`
35954  fi
35955  if test "x$new_path" = x; then
35956    # Oops. Which didn't find the executable.
35957    # The splitting of arguments from the executable at a space might have been incorrect,
35958    # since paths with space are more likely in Windows. Give it another try with the whole
35959    # argument.
35960    path="$complete"
35961    arguments="EOL"
35962    new_path=`$CYGPATH -u "$path"`
35963    new_path=`$WHICH "$new_path" 2> /dev/null`
35964    # bat and cmd files are not always considered executable in cygwin causing which
35965    # to not find them
35966    if test "x$new_path" = x \
35967        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35968        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35969      new_path=`$CYGPATH -u "$path"`
35970    fi
35971    if test "x$new_path" = x; then
35972      # It's still not found. Now this is an unrecoverable error.
35973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35974$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35975      has_space=`$ECHO "$complete" | $GREP " "`
35976      if test "x$has_space" != x; then
35977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35979      fi
35980      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35981    fi
35982  fi
35983
35984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35987  # "foo.exe" is OK but "foo" is an error.
35988  #
35989  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35990  # It is also a way to make sure we got the proper file name for the real test later on.
35991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35992  if test "x$test_shortpath" = x; then
35993    # Short path failed, file does not exist as specified.
35994    # Try adding .exe or .cmd
35995    if test -f "${new_path}.exe"; then
35996      input_to_shortpath="${new_path}.exe"
35997    elif test -f "${new_path}.cmd"; then
35998      input_to_shortpath="${new_path}.cmd"
35999    else
36000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36001$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36002      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36003$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36004      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36005    fi
36006  else
36007    input_to_shortpath="$new_path"
36008  fi
36009
36010  # Call helper function which possibly converts this using DOS-style short mode.
36011  # If so, the updated path is stored in $new_path.
36012  new_path="$input_to_shortpath"
36013
36014  input_path="$input_to_shortpath"
36015  # Check if we need to convert this using DOS-style short mode. If the path
36016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36017  # take no chances and rewrite it.
36018  # Note: m4 eats our [], so we need to use [ and ] instead.
36019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36020  if test "x$has_forbidden_chars" != x; then
36021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36025      # Going to short mode and back again did indeed matter. Since short mode is
36026      # case insensitive, let's make it lowercase to improve readability.
36027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36028      # Now convert it back to Unix-style (cygpath)
36029      input_path=`$CYGPATH -u "$shortmode_path"`
36030      new_path="$input_path"
36031    fi
36032  fi
36033
36034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36035  if test "x$test_cygdrive_prefix" = x; then
36036    # As a simple fix, exclude /usr/bin since it's not a real path.
36037    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36039      # a path prefixed by /cygdrive for fixpath to work.
36040      new_path="$CYGWIN_ROOT_PATH$input_path"
36041    fi
36042  fi
36043
36044  # remove trailing .exe if any
36045  new_path="${new_path/%.exe/}"
36046
36047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36048
36049  # First separate the path from the arguments. This will split at the first
36050  # space.
36051  complete="$CXXCPP"
36052  path="${complete%% *}"
36053  tmp="$complete EOL"
36054  arguments="${tmp#* }"
36055
36056  # Input might be given as Windows format, start by converting to
36057  # unix format.
36058  new_path="$path"
36059
36060  windows_path="$new_path"
36061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36062    unix_path=`$CYGPATH -u "$windows_path"`
36063    new_path="$unix_path"
36064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36066    new_path="$unix_path"
36067  fi
36068
36069
36070  # Now try to locate executable using which
36071  new_path=`$WHICH "$new_path" 2> /dev/null`
36072
36073  if test "x$new_path" = x; then
36074    # Oops. Which didn't find the executable.
36075    # The splitting of arguments from the executable at a space might have been incorrect,
36076    # since paths with space are more likely in Windows. Give it another try with the whole
36077    # argument.
36078    path="$complete"
36079    arguments="EOL"
36080    new_path="$path"
36081
36082  windows_path="$new_path"
36083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36084    unix_path=`$CYGPATH -u "$windows_path"`
36085    new_path="$unix_path"
36086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36088    new_path="$unix_path"
36089  fi
36090
36091
36092    new_path=`$WHICH "$new_path" 2> /dev/null`
36093    # bat and cmd files are not always considered executable in MSYS causing which
36094    # to not find them
36095    if test "x$new_path" = x \
36096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36098      new_path="$path"
36099
36100  windows_path="$new_path"
36101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36102    unix_path=`$CYGPATH -u "$windows_path"`
36103    new_path="$unix_path"
36104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36106    new_path="$unix_path"
36107  fi
36108
36109    fi
36110
36111    if test "x$new_path" = x; then
36112      # It's still not found. Now this is an unrecoverable error.
36113      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36114$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36115      has_space=`$ECHO "$complete" | $GREP " "`
36116      if test "x$has_space" != x; then
36117        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36118$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36119      fi
36120      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36121    fi
36122  fi
36123
36124  # Now new_path has a complete unix path to the binary
36125  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36126    # Keep paths in /bin as-is, but remove trailing .exe if any
36127    new_path="${new_path/%.exe/}"
36128    # Do not save /bin paths to all_fixpath_prefixes!
36129  else
36130    # Not in mixed or Windows style, start by that.
36131    new_path=`cmd //c echo $new_path`
36132
36133  input_path="$new_path"
36134  # Check if we need to convert this using DOS-style short mode. If the path
36135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36136  # take no chances and rewrite it.
36137  # Note: m4 eats our [], so we need to use [ and ] instead.
36138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36139  if test "x$has_forbidden_chars" != x; then
36140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36142  fi
36143
36144    # Output is in $new_path
36145
36146  windows_path="$new_path"
36147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36148    unix_path=`$CYGPATH -u "$windows_path"`
36149    new_path="$unix_path"
36150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36152    new_path="$unix_path"
36153  fi
36154
36155    # remove trailing .exe if any
36156    new_path="${new_path/%.exe/}"
36157
36158    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36159    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36160  fi
36161
36162    else
36163      # We're on a unix platform. Hooray! :)
36164      # First separate the path from the arguments. This will split at the first
36165      # space.
36166      complete="$CXXCPP"
36167      path="${complete%% *}"
36168      tmp="$complete EOL"
36169      arguments="${tmp#* }"
36170
36171      # Cannot rely on the command "which" here since it doesn't always work.
36172      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36173      if test -z "$is_absolute_path"; then
36174        # Path to executable is not absolute. Find it.
36175        IFS_save="$IFS"
36176        IFS=:
36177        for p in $PATH; do
36178          if test -f "$p/$path" && test -x "$p/$path"; then
36179            new_path="$p/$path"
36180            break
36181          fi
36182        done
36183        IFS="$IFS_save"
36184      else
36185        # This is an absolute path, we can use it without further modifications.
36186        new_path="$path"
36187      fi
36188
36189      if test "x$new_path" = x; then
36190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36191$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36192        has_space=`$ECHO "$complete" | $GREP " "`
36193        if test "x$has_space" != x; then
36194          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36195$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36196        fi
36197        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36198      fi
36199    fi
36200
36201    # Now join together the path and the arguments once again
36202    if test "x$arguments" != xEOL; then
36203      new_complete="$new_path ${arguments% *}"
36204    else
36205      new_complete="$new_path"
36206    fi
36207
36208    if test "x$complete" != "x$new_complete"; then
36209      CXXCPP="$new_complete"
36210      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36211$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36212    fi
36213  fi
36214
36215
36216  #
36217  # Setup the linker (LD)
36218  #
36219  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36220    # In the Microsoft toolchain we have a separate LD command "link".
36221    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36222    # a cygwin program for something completely different.
36223    # Extract the first word of "link", so it can be a program name with args.
36224set dummy link; ac_word=$2
36225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36226$as_echo_n "checking for $ac_word... " >&6; }
36227if ${ac_cv_prog_LD+:} false; then :
36228  $as_echo_n "(cached) " >&6
36229else
36230  if test -n "$LD"; then
36231  ac_cv_prog_LD="$LD" # Let the user override the test.
36232else
36233  ac_prog_rejected=no
36234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36235for as_dir in $PATH
36236do
36237  IFS=$as_save_IFS
36238  test -z "$as_dir" && as_dir=.
36239    for ac_exec_ext in '' $ac_executable_extensions; do
36240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36241    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36242       ac_prog_rejected=yes
36243       continue
36244     fi
36245    ac_cv_prog_LD="link"
36246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36247    break 2
36248  fi
36249done
36250  done
36251IFS=$as_save_IFS
36252
36253if test $ac_prog_rejected = yes; then
36254  # We found a bogon in the path, so make sure we never use it.
36255  set dummy $ac_cv_prog_LD
36256  shift
36257  if test $# != 0; then
36258    # We chose a different compiler from the bogus one.
36259    # However, it has the same basename, so the bogon will be chosen
36260    # first if we set LD to just the basename; use the full file name.
36261    shift
36262    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36263  fi
36264fi
36265fi
36266fi
36267LD=$ac_cv_prog_LD
36268if test -n "$LD"; then
36269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36270$as_echo "$LD" >&6; }
36271else
36272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36273$as_echo "no" >&6; }
36274fi
36275
36276
36277
36278  # Only process if variable expands to non-empty
36279
36280  if test "x$LD" != x; then
36281    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36282
36283  # First separate the path from the arguments. This will split at the first
36284  # space.
36285  complete="$LD"
36286  path="${complete%% *}"
36287  tmp="$complete EOL"
36288  arguments="${tmp#* }"
36289
36290  # Input might be given as Windows format, start by converting to
36291  # unix format.
36292  new_path=`$CYGPATH -u "$path"`
36293
36294  # Now try to locate executable using which
36295  new_path=`$WHICH "$new_path" 2> /dev/null`
36296  # bat and cmd files are not always considered executable in cygwin causing which
36297  # to not find them
36298  if test "x$new_path" = x \
36299      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36300      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36301    new_path=`$CYGPATH -u "$path"`
36302  fi
36303  if test "x$new_path" = x; then
36304    # Oops. Which didn't find the executable.
36305    # The splitting of arguments from the executable at a space might have been incorrect,
36306    # since paths with space are more likely in Windows. Give it another try with the whole
36307    # argument.
36308    path="$complete"
36309    arguments="EOL"
36310    new_path=`$CYGPATH -u "$path"`
36311    new_path=`$WHICH "$new_path" 2> /dev/null`
36312    # bat and cmd files are not always considered executable in cygwin causing which
36313    # to not find them
36314    if test "x$new_path" = x \
36315        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36316        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36317      new_path=`$CYGPATH -u "$path"`
36318    fi
36319    if test "x$new_path" = x; then
36320      # It's still not found. Now this is an unrecoverable error.
36321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36322$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36323      has_space=`$ECHO "$complete" | $GREP " "`
36324      if test "x$has_space" != x; then
36325        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36326$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36327      fi
36328      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36329    fi
36330  fi
36331
36332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36335  # "foo.exe" is OK but "foo" is an error.
36336  #
36337  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36338  # It is also a way to make sure we got the proper file name for the real test later on.
36339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36340  if test "x$test_shortpath" = x; then
36341    # Short path failed, file does not exist as specified.
36342    # Try adding .exe or .cmd
36343    if test -f "${new_path}.exe"; then
36344      input_to_shortpath="${new_path}.exe"
36345    elif test -f "${new_path}.cmd"; then
36346      input_to_shortpath="${new_path}.cmd"
36347    else
36348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36349$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36350      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36351$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36352      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36353    fi
36354  else
36355    input_to_shortpath="$new_path"
36356  fi
36357
36358  # Call helper function which possibly converts this using DOS-style short mode.
36359  # If so, the updated path is stored in $new_path.
36360  new_path="$input_to_shortpath"
36361
36362  input_path="$input_to_shortpath"
36363  # Check if we need to convert this using DOS-style short mode. If the path
36364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36365  # take no chances and rewrite it.
36366  # Note: m4 eats our [], so we need to use [ and ] instead.
36367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36368  if test "x$has_forbidden_chars" != x; then
36369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36373      # Going to short mode and back again did indeed matter. Since short mode is
36374      # case insensitive, let's make it lowercase to improve readability.
36375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36376      # Now convert it back to Unix-style (cygpath)
36377      input_path=`$CYGPATH -u "$shortmode_path"`
36378      new_path="$input_path"
36379    fi
36380  fi
36381
36382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36383  if test "x$test_cygdrive_prefix" = x; then
36384    # As a simple fix, exclude /usr/bin since it's not a real path.
36385    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36387      # a path prefixed by /cygdrive for fixpath to work.
36388      new_path="$CYGWIN_ROOT_PATH$input_path"
36389    fi
36390  fi
36391
36392  # remove trailing .exe if any
36393  new_path="${new_path/%.exe/}"
36394
36395    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36396
36397  # First separate the path from the arguments. This will split at the first
36398  # space.
36399  complete="$LD"
36400  path="${complete%% *}"
36401  tmp="$complete EOL"
36402  arguments="${tmp#* }"
36403
36404  # Input might be given as Windows format, start by converting to
36405  # unix format.
36406  new_path="$path"
36407
36408  windows_path="$new_path"
36409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36410    unix_path=`$CYGPATH -u "$windows_path"`
36411    new_path="$unix_path"
36412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36414    new_path="$unix_path"
36415  fi
36416
36417
36418  # Now try to locate executable using which
36419  new_path=`$WHICH "$new_path" 2> /dev/null`
36420
36421  if test "x$new_path" = x; then
36422    # Oops. Which didn't find the executable.
36423    # The splitting of arguments from the executable at a space might have been incorrect,
36424    # since paths with space are more likely in Windows. Give it another try with the whole
36425    # argument.
36426    path="$complete"
36427    arguments="EOL"
36428    new_path="$path"
36429
36430  windows_path="$new_path"
36431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36432    unix_path=`$CYGPATH -u "$windows_path"`
36433    new_path="$unix_path"
36434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36436    new_path="$unix_path"
36437  fi
36438
36439
36440    new_path=`$WHICH "$new_path" 2> /dev/null`
36441    # bat and cmd files are not always considered executable in MSYS causing which
36442    # to not find them
36443    if test "x$new_path" = x \
36444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36446      new_path="$path"
36447
36448  windows_path="$new_path"
36449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36450    unix_path=`$CYGPATH -u "$windows_path"`
36451    new_path="$unix_path"
36452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36454    new_path="$unix_path"
36455  fi
36456
36457    fi
36458
36459    if test "x$new_path" = x; then
36460      # It's still not found. Now this is an unrecoverable error.
36461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36462$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36463      has_space=`$ECHO "$complete" | $GREP " "`
36464      if test "x$has_space" != x; then
36465        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36466$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36467      fi
36468      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36469    fi
36470  fi
36471
36472  # Now new_path has a complete unix path to the binary
36473  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36474    # Keep paths in /bin as-is, but remove trailing .exe if any
36475    new_path="${new_path/%.exe/}"
36476    # Do not save /bin paths to all_fixpath_prefixes!
36477  else
36478    # Not in mixed or Windows style, start by that.
36479    new_path=`cmd //c echo $new_path`
36480
36481  input_path="$new_path"
36482  # Check if we need to convert this using DOS-style short mode. If the path
36483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36484  # take no chances and rewrite it.
36485  # Note: m4 eats our [], so we need to use [ and ] instead.
36486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36487  if test "x$has_forbidden_chars" != x; then
36488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36490  fi
36491
36492    # Output is in $new_path
36493
36494  windows_path="$new_path"
36495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36496    unix_path=`$CYGPATH -u "$windows_path"`
36497    new_path="$unix_path"
36498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36500    new_path="$unix_path"
36501  fi
36502
36503    # remove trailing .exe if any
36504    new_path="${new_path/%.exe/}"
36505
36506    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36507    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36508  fi
36509
36510    else
36511      # We're on a unix platform. Hooray! :)
36512      # First separate the path from the arguments. This will split at the first
36513      # space.
36514      complete="$LD"
36515      path="${complete%% *}"
36516      tmp="$complete EOL"
36517      arguments="${tmp#* }"
36518
36519      # Cannot rely on the command "which" here since it doesn't always work.
36520      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36521      if test -z "$is_absolute_path"; then
36522        # Path to executable is not absolute. Find it.
36523        IFS_save="$IFS"
36524        IFS=:
36525        for p in $PATH; do
36526          if test -f "$p/$path" && test -x "$p/$path"; then
36527            new_path="$p/$path"
36528            break
36529          fi
36530        done
36531        IFS="$IFS_save"
36532      else
36533        # This is an absolute path, we can use it without further modifications.
36534        new_path="$path"
36535      fi
36536
36537      if test "x$new_path" = x; then
36538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36539$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36540        has_space=`$ECHO "$complete" | $GREP " "`
36541        if test "x$has_space" != x; then
36542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36544        fi
36545        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36546      fi
36547    fi
36548
36549    # Now join together the path and the arguments once again
36550    if test "x$arguments" != xEOL; then
36551      new_complete="$new_path ${arguments% *}"
36552    else
36553      new_complete="$new_path"
36554    fi
36555
36556    if test "x$complete" != "x$new_complete"; then
36557      LD="$new_complete"
36558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36559$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36560    fi
36561  fi
36562
36563    # Verify that we indeed succeeded with this trick.
36564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36565$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36566    "$LD" --version > /dev/null
36567    if test $? -eq 0 ; then
36568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36569$as_echo "no" >&6; }
36570      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36571    else
36572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36573$as_echo "yes" >&6; }
36574    fi
36575    LDCXX="$LD"
36576  else
36577    # All other toolchains use the compiler to link.
36578    LD="$CC"
36579    LDCXX="$CXX"
36580  fi
36581
36582  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36583
36584
36585  #
36586  # Setup the assembler (AS)
36587  #
36588  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36589
36590
36591  # Publish this variable in the help.
36592
36593
36594  if [ -z "${AS+x}" ]; then
36595    # The variable is not set by user, try to locate tool using the code snippet
36596    for ac_prog in as
36597do
36598  # Extract the first word of "$ac_prog", so it can be a program name with args.
36599set dummy $ac_prog; ac_word=$2
36600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36601$as_echo_n "checking for $ac_word... " >&6; }
36602if ${ac_cv_path_AS+:} false; then :
36603  $as_echo_n "(cached) " >&6
36604else
36605  case $AS in
36606  [\\/]* | ?:[\\/]*)
36607  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36608  ;;
36609  *)
36610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36611for as_dir in $PATH
36612do
36613  IFS=$as_save_IFS
36614  test -z "$as_dir" && as_dir=.
36615    for ac_exec_ext in '' $ac_executable_extensions; do
36616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36617    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36619    break 2
36620  fi
36621done
36622  done
36623IFS=$as_save_IFS
36624
36625  ;;
36626esac
36627fi
36628AS=$ac_cv_path_AS
36629if test -n "$AS"; then
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36631$as_echo "$AS" >&6; }
36632else
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36634$as_echo "no" >&6; }
36635fi
36636
36637
36638  test -n "$AS" && break
36639done
36640
36641  else
36642    # The variable is set, but is it from the command line or the environment?
36643
36644    # Try to remove the string !AS! from our list.
36645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36647      # If it failed, the variable was not from the command line. Ignore it,
36648      # but warn the user (except for BASH, which is always set by the calling BASH).
36649      if test "xAS" != xBASH; then
36650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36651$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36652      fi
36653      # Try to locate tool using the code snippet
36654      for ac_prog in as
36655do
36656  # Extract the first word of "$ac_prog", so it can be a program name with args.
36657set dummy $ac_prog; ac_word=$2
36658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36659$as_echo_n "checking for $ac_word... " >&6; }
36660if ${ac_cv_path_AS+:} false; then :
36661  $as_echo_n "(cached) " >&6
36662else
36663  case $AS in
36664  [\\/]* | ?:[\\/]*)
36665  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36666  ;;
36667  *)
36668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36669for as_dir in $PATH
36670do
36671  IFS=$as_save_IFS
36672  test -z "$as_dir" && as_dir=.
36673    for ac_exec_ext in '' $ac_executable_extensions; do
36674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36675    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36677    break 2
36678  fi
36679done
36680  done
36681IFS=$as_save_IFS
36682
36683  ;;
36684esac
36685fi
36686AS=$ac_cv_path_AS
36687if test -n "$AS"; then
36688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36689$as_echo "$AS" >&6; }
36690else
36691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36692$as_echo "no" >&6; }
36693fi
36694
36695
36696  test -n "$AS" && break
36697done
36698
36699    else
36700      # If it succeeded, then it was overridden by the user. We will use it
36701      # for the tool.
36702
36703      # First remove it from the list of overridden variables, so we can test
36704      # for unknown variables in the end.
36705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36706
36707      # Check if we try to supply an empty value
36708      if test "x$AS" = x; then
36709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36710$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36712$as_echo_n "checking for AS... " >&6; }
36713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36714$as_echo "disabled" >&6; }
36715      else
36716        # Check if the provided tool contains a complete path.
36717        tool_specified="$AS"
36718        tool_basename="${tool_specified##*/}"
36719        if test "x$tool_basename" = "x$tool_specified"; then
36720          # A command without a complete path is provided, search $PATH.
36721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36722$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36723          # Extract the first word of "$tool_basename", so it can be a program name with args.
36724set dummy $tool_basename; ac_word=$2
36725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36726$as_echo_n "checking for $ac_word... " >&6; }
36727if ${ac_cv_path_AS+:} false; then :
36728  $as_echo_n "(cached) " >&6
36729else
36730  case $AS in
36731  [\\/]* | ?:[\\/]*)
36732  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36733  ;;
36734  *)
36735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36736for as_dir in $PATH
36737do
36738  IFS=$as_save_IFS
36739  test -z "$as_dir" && as_dir=.
36740    for ac_exec_ext in '' $ac_executable_extensions; do
36741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36742    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36744    break 2
36745  fi
36746done
36747  done
36748IFS=$as_save_IFS
36749
36750  ;;
36751esac
36752fi
36753AS=$ac_cv_path_AS
36754if test -n "$AS"; then
36755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36756$as_echo "$AS" >&6; }
36757else
36758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36759$as_echo "no" >&6; }
36760fi
36761
36762
36763          if test "x$AS" = x; then
36764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36765          fi
36766        else
36767          # Otherwise we believe it is a complete path. Use it as it is.
36768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36769$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36771$as_echo_n "checking for AS... " >&6; }
36772          if test ! -x "$tool_specified"; then
36773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36774$as_echo "not found" >&6; }
36775            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36776          fi
36777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36778$as_echo "$tool_specified" >&6; }
36779        fi
36780      fi
36781    fi
36782
36783  fi
36784
36785
36786
36787  # Only process if variable expands to non-empty
36788
36789  if test "x$AS" != x; then
36790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36791
36792  # First separate the path from the arguments. This will split at the first
36793  # space.
36794  complete="$AS"
36795  path="${complete%% *}"
36796  tmp="$complete EOL"
36797  arguments="${tmp#* }"
36798
36799  # Input might be given as Windows format, start by converting to
36800  # unix format.
36801  new_path=`$CYGPATH -u "$path"`
36802
36803  # Now try to locate executable using which
36804  new_path=`$WHICH "$new_path" 2> /dev/null`
36805  # bat and cmd files are not always considered executable in cygwin causing which
36806  # to not find them
36807  if test "x$new_path" = x \
36808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36810    new_path=`$CYGPATH -u "$path"`
36811  fi
36812  if test "x$new_path" = x; then
36813    # Oops. Which didn't find the executable.
36814    # The splitting of arguments from the executable at a space might have been incorrect,
36815    # since paths with space are more likely in Windows. Give it another try with the whole
36816    # argument.
36817    path="$complete"
36818    arguments="EOL"
36819    new_path=`$CYGPATH -u "$path"`
36820    new_path=`$WHICH "$new_path" 2> /dev/null`
36821    # bat and cmd files are not always considered executable in cygwin causing which
36822    # to not find them
36823    if test "x$new_path" = x \
36824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36826      new_path=`$CYGPATH -u "$path"`
36827    fi
36828    if test "x$new_path" = x; then
36829      # It's still not found. Now this is an unrecoverable error.
36830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36831$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36832      has_space=`$ECHO "$complete" | $GREP " "`
36833      if test "x$has_space" != x; then
36834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36836      fi
36837      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36838    fi
36839  fi
36840
36841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36844  # "foo.exe" is OK but "foo" is an error.
36845  #
36846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36847  # It is also a way to make sure we got the proper file name for the real test later on.
36848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36849  if test "x$test_shortpath" = x; then
36850    # Short path failed, file does not exist as specified.
36851    # Try adding .exe or .cmd
36852    if test -f "${new_path}.exe"; then
36853      input_to_shortpath="${new_path}.exe"
36854    elif test -f "${new_path}.cmd"; then
36855      input_to_shortpath="${new_path}.cmd"
36856    else
36857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36858$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36861      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36862    fi
36863  else
36864    input_to_shortpath="$new_path"
36865  fi
36866
36867  # Call helper function which possibly converts this using DOS-style short mode.
36868  # If so, the updated path is stored in $new_path.
36869  new_path="$input_to_shortpath"
36870
36871  input_path="$input_to_shortpath"
36872  # Check if we need to convert this using DOS-style short mode. If the path
36873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36874  # take no chances and rewrite it.
36875  # Note: m4 eats our [], so we need to use [ and ] instead.
36876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36877  if test "x$has_forbidden_chars" != x; then
36878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36882      # Going to short mode and back again did indeed matter. Since short mode is
36883      # case insensitive, let's make it lowercase to improve readability.
36884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36885      # Now convert it back to Unix-style (cygpath)
36886      input_path=`$CYGPATH -u "$shortmode_path"`
36887      new_path="$input_path"
36888    fi
36889  fi
36890
36891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36892  if test "x$test_cygdrive_prefix" = x; then
36893    # As a simple fix, exclude /usr/bin since it's not a real path.
36894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36896      # a path prefixed by /cygdrive for fixpath to work.
36897      new_path="$CYGWIN_ROOT_PATH$input_path"
36898    fi
36899  fi
36900
36901  # remove trailing .exe if any
36902  new_path="${new_path/%.exe/}"
36903
36904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36905
36906  # First separate the path from the arguments. This will split at the first
36907  # space.
36908  complete="$AS"
36909  path="${complete%% *}"
36910  tmp="$complete EOL"
36911  arguments="${tmp#* }"
36912
36913  # Input might be given as Windows format, start by converting to
36914  # unix format.
36915  new_path="$path"
36916
36917  windows_path="$new_path"
36918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36919    unix_path=`$CYGPATH -u "$windows_path"`
36920    new_path="$unix_path"
36921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36923    new_path="$unix_path"
36924  fi
36925
36926
36927  # Now try to locate executable using which
36928  new_path=`$WHICH "$new_path" 2> /dev/null`
36929
36930  if test "x$new_path" = x; then
36931    # Oops. Which didn't find the executable.
36932    # The splitting of arguments from the executable at a space might have been incorrect,
36933    # since paths with space are more likely in Windows. Give it another try with the whole
36934    # argument.
36935    path="$complete"
36936    arguments="EOL"
36937    new_path="$path"
36938
36939  windows_path="$new_path"
36940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36941    unix_path=`$CYGPATH -u "$windows_path"`
36942    new_path="$unix_path"
36943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36945    new_path="$unix_path"
36946  fi
36947
36948
36949    new_path=`$WHICH "$new_path" 2> /dev/null`
36950    # bat and cmd files are not always considered executable in MSYS causing which
36951    # to not find them
36952    if test "x$new_path" = x \
36953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36955      new_path="$path"
36956
36957  windows_path="$new_path"
36958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36959    unix_path=`$CYGPATH -u "$windows_path"`
36960    new_path="$unix_path"
36961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36963    new_path="$unix_path"
36964  fi
36965
36966    fi
36967
36968    if test "x$new_path" = x; then
36969      # It's still not found. Now this is an unrecoverable error.
36970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36971$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36972      has_space=`$ECHO "$complete" | $GREP " "`
36973      if test "x$has_space" != x; then
36974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36976      fi
36977      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36978    fi
36979  fi
36980
36981  # Now new_path has a complete unix path to the binary
36982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36983    # Keep paths in /bin as-is, but remove trailing .exe if any
36984    new_path="${new_path/%.exe/}"
36985    # Do not save /bin paths to all_fixpath_prefixes!
36986  else
36987    # Not in mixed or Windows style, start by that.
36988    new_path=`cmd //c echo $new_path`
36989
36990  input_path="$new_path"
36991  # Check if we need to convert this using DOS-style short mode. If the path
36992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36993  # take no chances and rewrite it.
36994  # Note: m4 eats our [], so we need to use [ and ] instead.
36995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36996  if test "x$has_forbidden_chars" != x; then
36997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36999  fi
37000
37001    # Output is in $new_path
37002
37003  windows_path="$new_path"
37004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37005    unix_path=`$CYGPATH -u "$windows_path"`
37006    new_path="$unix_path"
37007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37009    new_path="$unix_path"
37010  fi
37011
37012    # remove trailing .exe if any
37013    new_path="${new_path/%.exe/}"
37014
37015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37017  fi
37018
37019    else
37020      # We're on a unix platform. Hooray! :)
37021      # First separate the path from the arguments. This will split at the first
37022      # space.
37023      complete="$AS"
37024      path="${complete%% *}"
37025      tmp="$complete EOL"
37026      arguments="${tmp#* }"
37027
37028      # Cannot rely on the command "which" here since it doesn't always work.
37029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37030      if test -z "$is_absolute_path"; then
37031        # Path to executable is not absolute. Find it.
37032        IFS_save="$IFS"
37033        IFS=:
37034        for p in $PATH; do
37035          if test -f "$p/$path" && test -x "$p/$path"; then
37036            new_path="$p/$path"
37037            break
37038          fi
37039        done
37040        IFS="$IFS_save"
37041      else
37042        # This is an absolute path, we can use it without further modifications.
37043        new_path="$path"
37044      fi
37045
37046      if test "x$new_path" = x; then
37047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37048$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37049        has_space=`$ECHO "$complete" | $GREP " "`
37050        if test "x$has_space" != x; then
37051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37053        fi
37054        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37055      fi
37056    fi
37057
37058    # Now join together the path and the arguments once again
37059    if test "x$arguments" != xEOL; then
37060      new_complete="$new_path ${arguments% *}"
37061    else
37062      new_complete="$new_path"
37063    fi
37064
37065    if test "x$complete" != "x$new_complete"; then
37066      AS="$new_complete"
37067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37068$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37069    fi
37070  fi
37071
37072    if test "x$AS" = x; then
37073      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37074    fi
37075  else
37076    # FIXME: is this correct for microsoft?
37077    AS="$CC -c"
37078  fi
37079
37080
37081  #
37082  # Setup the archiver (AR)
37083  #
37084  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37085    # The corresponding ar tool is lib.exe (used to create static libraries)
37086    # Extract the first word of "lib", so it can be a program name with args.
37087set dummy lib; ac_word=$2
37088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37089$as_echo_n "checking for $ac_word... " >&6; }
37090if ${ac_cv_prog_AR+:} false; then :
37091  $as_echo_n "(cached) " >&6
37092else
37093  if test -n "$AR"; then
37094  ac_cv_prog_AR="$AR" # Let the user override the test.
37095else
37096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37097for as_dir in $PATH
37098do
37099  IFS=$as_save_IFS
37100  test -z "$as_dir" && as_dir=.
37101    for ac_exec_ext in '' $ac_executable_extensions; do
37102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37103    ac_cv_prog_AR="lib"
37104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37105    break 2
37106  fi
37107done
37108  done
37109IFS=$as_save_IFS
37110
37111fi
37112fi
37113AR=$ac_cv_prog_AR
37114if test -n "$AR"; then
37115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37116$as_echo "$AR" >&6; }
37117else
37118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37119$as_echo "no" >&6; }
37120fi
37121
37122
37123  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37124
37125
37126  # Publish this variable in the help.
37127
37128
37129  if [ -z "${AR+x}" ]; then
37130    # The variable is not set by user, try to locate tool using the code snippet
37131    if test -n "$ac_tool_prefix"; then
37132  for ac_prog in ar gcc-ar
37133  do
37134    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37135set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37137$as_echo_n "checking for $ac_word... " >&6; }
37138if ${ac_cv_prog_AR+:} false; then :
37139  $as_echo_n "(cached) " >&6
37140else
37141  if test -n "$AR"; then
37142  ac_cv_prog_AR="$AR" # Let the user override the test.
37143else
37144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37145for as_dir in $PATH
37146do
37147  IFS=$as_save_IFS
37148  test -z "$as_dir" && as_dir=.
37149    for ac_exec_ext in '' $ac_executable_extensions; do
37150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37151    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37153    break 2
37154  fi
37155done
37156  done
37157IFS=$as_save_IFS
37158
37159fi
37160fi
37161AR=$ac_cv_prog_AR
37162if test -n "$AR"; then
37163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37164$as_echo "$AR" >&6; }
37165else
37166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37167$as_echo "no" >&6; }
37168fi
37169
37170
37171    test -n "$AR" && break
37172  done
37173fi
37174if test -z "$AR"; then
37175  ac_ct_AR=$AR
37176  for ac_prog in ar gcc-ar
37177do
37178  # Extract the first word of "$ac_prog", so it can be a program name with args.
37179set dummy $ac_prog; ac_word=$2
37180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37181$as_echo_n "checking for $ac_word... " >&6; }
37182if ${ac_cv_prog_ac_ct_AR+:} false; then :
37183  $as_echo_n "(cached) " >&6
37184else
37185  if test -n "$ac_ct_AR"; then
37186  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37187else
37188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37189for as_dir in $PATH
37190do
37191  IFS=$as_save_IFS
37192  test -z "$as_dir" && as_dir=.
37193    for ac_exec_ext in '' $ac_executable_extensions; do
37194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37195    ac_cv_prog_ac_ct_AR="$ac_prog"
37196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37197    break 2
37198  fi
37199done
37200  done
37201IFS=$as_save_IFS
37202
37203fi
37204fi
37205ac_ct_AR=$ac_cv_prog_ac_ct_AR
37206if test -n "$ac_ct_AR"; then
37207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37208$as_echo "$ac_ct_AR" >&6; }
37209else
37210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37211$as_echo "no" >&6; }
37212fi
37213
37214
37215  test -n "$ac_ct_AR" && break
37216done
37217
37218  if test "x$ac_ct_AR" = x; then
37219    AR=""
37220  else
37221    case $cross_compiling:$ac_tool_warned in
37222yes:)
37223{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37224$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37225ac_tool_warned=yes ;;
37226esac
37227    AR=$ac_ct_AR
37228  fi
37229fi
37230
37231  else
37232    # The variable is set, but is it from the command line or the environment?
37233
37234    # Try to remove the string !AR! from our list.
37235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37237      # If it failed, the variable was not from the command line. Ignore it,
37238      # but warn the user (except for BASH, which is always set by the calling BASH).
37239      if test "xAR" != xBASH; then
37240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37241$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37242      fi
37243      # Try to locate tool using the code snippet
37244      if test -n "$ac_tool_prefix"; then
37245  for ac_prog in ar gcc-ar
37246  do
37247    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37248set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37250$as_echo_n "checking for $ac_word... " >&6; }
37251if ${ac_cv_prog_AR+:} false; then :
37252  $as_echo_n "(cached) " >&6
37253else
37254  if test -n "$AR"; then
37255  ac_cv_prog_AR="$AR" # Let the user override the test.
37256else
37257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37258for as_dir in $PATH
37259do
37260  IFS=$as_save_IFS
37261  test -z "$as_dir" && as_dir=.
37262    for ac_exec_ext in '' $ac_executable_extensions; do
37263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37264    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37266    break 2
37267  fi
37268done
37269  done
37270IFS=$as_save_IFS
37271
37272fi
37273fi
37274AR=$ac_cv_prog_AR
37275if test -n "$AR"; then
37276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37277$as_echo "$AR" >&6; }
37278else
37279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37280$as_echo "no" >&6; }
37281fi
37282
37283
37284    test -n "$AR" && break
37285  done
37286fi
37287if test -z "$AR"; then
37288  ac_ct_AR=$AR
37289  for ac_prog in ar gcc-ar
37290do
37291  # Extract the first word of "$ac_prog", so it can be a program name with args.
37292set dummy $ac_prog; ac_word=$2
37293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37294$as_echo_n "checking for $ac_word... " >&6; }
37295if ${ac_cv_prog_ac_ct_AR+:} false; then :
37296  $as_echo_n "(cached) " >&6
37297else
37298  if test -n "$ac_ct_AR"; then
37299  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37300else
37301as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37302for as_dir in $PATH
37303do
37304  IFS=$as_save_IFS
37305  test -z "$as_dir" && as_dir=.
37306    for ac_exec_ext in '' $ac_executable_extensions; do
37307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37308    ac_cv_prog_ac_ct_AR="$ac_prog"
37309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37310    break 2
37311  fi
37312done
37313  done
37314IFS=$as_save_IFS
37315
37316fi
37317fi
37318ac_ct_AR=$ac_cv_prog_ac_ct_AR
37319if test -n "$ac_ct_AR"; then
37320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37321$as_echo "$ac_ct_AR" >&6; }
37322else
37323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37324$as_echo "no" >&6; }
37325fi
37326
37327
37328  test -n "$ac_ct_AR" && break
37329done
37330
37331  if test "x$ac_ct_AR" = x; then
37332    AR=""
37333  else
37334    case $cross_compiling:$ac_tool_warned in
37335yes:)
37336{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37337$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37338ac_tool_warned=yes ;;
37339esac
37340    AR=$ac_ct_AR
37341  fi
37342fi
37343
37344    else
37345      # If it succeeded, then it was overridden by the user. We will use it
37346      # for the tool.
37347
37348      # First remove it from the list of overridden variables, so we can test
37349      # for unknown variables in the end.
37350      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37351
37352      # Check if we try to supply an empty value
37353      if test "x$AR" = x; then
37354        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37355$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37356        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37357$as_echo_n "checking for AR... " >&6; }
37358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37359$as_echo "disabled" >&6; }
37360      else
37361        # Check if the provided tool contains a complete path.
37362        tool_specified="$AR"
37363        tool_basename="${tool_specified##*/}"
37364        if test "x$tool_basename" = "x$tool_specified"; then
37365          # A command without a complete path is provided, search $PATH.
37366          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37367$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37368          # Extract the first word of "$tool_basename", so it can be a program name with args.
37369set dummy $tool_basename; ac_word=$2
37370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37371$as_echo_n "checking for $ac_word... " >&6; }
37372if ${ac_cv_path_AR+:} false; then :
37373  $as_echo_n "(cached) " >&6
37374else
37375  case $AR in
37376  [\\/]* | ?:[\\/]*)
37377  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37378  ;;
37379  *)
37380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37381for as_dir in $PATH
37382do
37383  IFS=$as_save_IFS
37384  test -z "$as_dir" && as_dir=.
37385    for ac_exec_ext in '' $ac_executable_extensions; do
37386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37387    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37389    break 2
37390  fi
37391done
37392  done
37393IFS=$as_save_IFS
37394
37395  ;;
37396esac
37397fi
37398AR=$ac_cv_path_AR
37399if test -n "$AR"; then
37400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37401$as_echo "$AR" >&6; }
37402else
37403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37404$as_echo "no" >&6; }
37405fi
37406
37407
37408          if test "x$AR" = x; then
37409            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37410          fi
37411        else
37412          # Otherwise we believe it is a complete path. Use it as it is.
37413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37414$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37415          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37416$as_echo_n "checking for AR... " >&6; }
37417          if test ! -x "$tool_specified"; then
37418            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37419$as_echo "not found" >&6; }
37420            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37421          fi
37422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37423$as_echo "$tool_specified" >&6; }
37424        fi
37425      fi
37426    fi
37427
37428  fi
37429
37430
37431  else
37432
37433
37434  # Publish this variable in the help.
37435
37436
37437  if [ -z "${AR+x}" ]; then
37438    # The variable is not set by user, try to locate tool using the code snippet
37439    if test -n "$ac_tool_prefix"; then
37440  for ac_prog in ar
37441  do
37442    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37443set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37445$as_echo_n "checking for $ac_word... " >&6; }
37446if ${ac_cv_prog_AR+:} false; then :
37447  $as_echo_n "(cached) " >&6
37448else
37449  if test -n "$AR"; then
37450  ac_cv_prog_AR="$AR" # Let the user override the test.
37451else
37452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37453for as_dir in $PATH
37454do
37455  IFS=$as_save_IFS
37456  test -z "$as_dir" && as_dir=.
37457    for ac_exec_ext in '' $ac_executable_extensions; do
37458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37459    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37461    break 2
37462  fi
37463done
37464  done
37465IFS=$as_save_IFS
37466
37467fi
37468fi
37469AR=$ac_cv_prog_AR
37470if test -n "$AR"; then
37471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37472$as_echo "$AR" >&6; }
37473else
37474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37475$as_echo "no" >&6; }
37476fi
37477
37478
37479    test -n "$AR" && break
37480  done
37481fi
37482if test -z "$AR"; then
37483  ac_ct_AR=$AR
37484  for ac_prog in ar
37485do
37486  # Extract the first word of "$ac_prog", so it can be a program name with args.
37487set dummy $ac_prog; ac_word=$2
37488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37489$as_echo_n "checking for $ac_word... " >&6; }
37490if ${ac_cv_prog_ac_ct_AR+:} false; then :
37491  $as_echo_n "(cached) " >&6
37492else
37493  if test -n "$ac_ct_AR"; then
37494  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37495else
37496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37497for as_dir in $PATH
37498do
37499  IFS=$as_save_IFS
37500  test -z "$as_dir" && as_dir=.
37501    for ac_exec_ext in '' $ac_executable_extensions; do
37502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37503    ac_cv_prog_ac_ct_AR="$ac_prog"
37504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37505    break 2
37506  fi
37507done
37508  done
37509IFS=$as_save_IFS
37510
37511fi
37512fi
37513ac_ct_AR=$ac_cv_prog_ac_ct_AR
37514if test -n "$ac_ct_AR"; then
37515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37516$as_echo "$ac_ct_AR" >&6; }
37517else
37518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37519$as_echo "no" >&6; }
37520fi
37521
37522
37523  test -n "$ac_ct_AR" && break
37524done
37525
37526  if test "x$ac_ct_AR" = x; then
37527    AR=""
37528  else
37529    case $cross_compiling:$ac_tool_warned in
37530yes:)
37531{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37532$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37533ac_tool_warned=yes ;;
37534esac
37535    AR=$ac_ct_AR
37536  fi
37537fi
37538
37539  else
37540    # The variable is set, but is it from the command line or the environment?
37541
37542    # Try to remove the string !AR! from our list.
37543    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37544    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37545      # If it failed, the variable was not from the command line. Ignore it,
37546      # but warn the user (except for BASH, which is always set by the calling BASH).
37547      if test "xAR" != xBASH; then
37548        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37549$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37550      fi
37551      # Try to locate tool using the code snippet
37552      if test -n "$ac_tool_prefix"; then
37553  for ac_prog in ar
37554  do
37555    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37556set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37558$as_echo_n "checking for $ac_word... " >&6; }
37559if ${ac_cv_prog_AR+:} false; then :
37560  $as_echo_n "(cached) " >&6
37561else
37562  if test -n "$AR"; then
37563  ac_cv_prog_AR="$AR" # Let the user override the test.
37564else
37565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37566for as_dir in $PATH
37567do
37568  IFS=$as_save_IFS
37569  test -z "$as_dir" && as_dir=.
37570    for ac_exec_ext in '' $ac_executable_extensions; do
37571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37572    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37574    break 2
37575  fi
37576done
37577  done
37578IFS=$as_save_IFS
37579
37580fi
37581fi
37582AR=$ac_cv_prog_AR
37583if test -n "$AR"; then
37584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37585$as_echo "$AR" >&6; }
37586else
37587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37588$as_echo "no" >&6; }
37589fi
37590
37591
37592    test -n "$AR" && break
37593  done
37594fi
37595if test -z "$AR"; then
37596  ac_ct_AR=$AR
37597  for ac_prog in ar
37598do
37599  # Extract the first word of "$ac_prog", so it can be a program name with args.
37600set dummy $ac_prog; ac_word=$2
37601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37602$as_echo_n "checking for $ac_word... " >&6; }
37603if ${ac_cv_prog_ac_ct_AR+:} false; then :
37604  $as_echo_n "(cached) " >&6
37605else
37606  if test -n "$ac_ct_AR"; then
37607  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37608else
37609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37610for as_dir in $PATH
37611do
37612  IFS=$as_save_IFS
37613  test -z "$as_dir" && as_dir=.
37614    for ac_exec_ext in '' $ac_executable_extensions; do
37615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37616    ac_cv_prog_ac_ct_AR="$ac_prog"
37617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37618    break 2
37619  fi
37620done
37621  done
37622IFS=$as_save_IFS
37623
37624fi
37625fi
37626ac_ct_AR=$ac_cv_prog_ac_ct_AR
37627if test -n "$ac_ct_AR"; then
37628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37629$as_echo "$ac_ct_AR" >&6; }
37630else
37631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37632$as_echo "no" >&6; }
37633fi
37634
37635
37636  test -n "$ac_ct_AR" && break
37637done
37638
37639  if test "x$ac_ct_AR" = x; then
37640    AR=""
37641  else
37642    case $cross_compiling:$ac_tool_warned in
37643yes:)
37644{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37645$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37646ac_tool_warned=yes ;;
37647esac
37648    AR=$ac_ct_AR
37649  fi
37650fi
37651
37652    else
37653      # If it succeeded, then it was overridden by the user. We will use it
37654      # for the tool.
37655
37656      # First remove it from the list of overridden variables, so we can test
37657      # for unknown variables in the end.
37658      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37659
37660      # Check if we try to supply an empty value
37661      if test "x$AR" = x; then
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37663$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37665$as_echo_n "checking for AR... " >&6; }
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37667$as_echo "disabled" >&6; }
37668      else
37669        # Check if the provided tool contains a complete path.
37670        tool_specified="$AR"
37671        tool_basename="${tool_specified##*/}"
37672        if test "x$tool_basename" = "x$tool_specified"; then
37673          # A command without a complete path is provided, search $PATH.
37674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37675$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37676          # Extract the first word of "$tool_basename", so it can be a program name with args.
37677set dummy $tool_basename; ac_word=$2
37678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37679$as_echo_n "checking for $ac_word... " >&6; }
37680if ${ac_cv_path_AR+:} false; then :
37681  $as_echo_n "(cached) " >&6
37682else
37683  case $AR in
37684  [\\/]* | ?:[\\/]*)
37685  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37686  ;;
37687  *)
37688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37689for as_dir in $PATH
37690do
37691  IFS=$as_save_IFS
37692  test -z "$as_dir" && as_dir=.
37693    for ac_exec_ext in '' $ac_executable_extensions; do
37694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37695    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37697    break 2
37698  fi
37699done
37700  done
37701IFS=$as_save_IFS
37702
37703  ;;
37704esac
37705fi
37706AR=$ac_cv_path_AR
37707if test -n "$AR"; then
37708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37709$as_echo "$AR" >&6; }
37710else
37711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37712$as_echo "no" >&6; }
37713fi
37714
37715
37716          if test "x$AR" = x; then
37717            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37718          fi
37719        else
37720          # Otherwise we believe it is a complete path. Use it as it is.
37721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37722$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37723          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37724$as_echo_n "checking for AR... " >&6; }
37725          if test ! -x "$tool_specified"; then
37726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37727$as_echo "not found" >&6; }
37728            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37729          fi
37730          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37731$as_echo "$tool_specified" >&6; }
37732        fi
37733      fi
37734    fi
37735
37736  fi
37737
37738
37739  fi
37740
37741  # Only process if variable expands to non-empty
37742
37743  if test "x$AR" != x; then
37744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37745
37746  # First separate the path from the arguments. This will split at the first
37747  # space.
37748  complete="$AR"
37749  path="${complete%% *}"
37750  tmp="$complete EOL"
37751  arguments="${tmp#* }"
37752
37753  # Input might be given as Windows format, start by converting to
37754  # unix format.
37755  new_path=`$CYGPATH -u "$path"`
37756
37757  # Now try to locate executable using which
37758  new_path=`$WHICH "$new_path" 2> /dev/null`
37759  # bat and cmd files are not always considered executable in cygwin causing which
37760  # to not find them
37761  if test "x$new_path" = x \
37762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37764    new_path=`$CYGPATH -u "$path"`
37765  fi
37766  if test "x$new_path" = x; then
37767    # Oops. Which didn't find the executable.
37768    # The splitting of arguments from the executable at a space might have been incorrect,
37769    # since paths with space are more likely in Windows. Give it another try with the whole
37770    # argument.
37771    path="$complete"
37772    arguments="EOL"
37773    new_path=`$CYGPATH -u "$path"`
37774    new_path=`$WHICH "$new_path" 2> /dev/null`
37775    # bat and cmd files are not always considered executable in cygwin causing which
37776    # to not find them
37777    if test "x$new_path" = x \
37778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37780      new_path=`$CYGPATH -u "$path"`
37781    fi
37782    if test "x$new_path" = x; then
37783      # It's still not found. Now this is an unrecoverable error.
37784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37785$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37786      has_space=`$ECHO "$complete" | $GREP " "`
37787      if test "x$has_space" != x; then
37788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37790      fi
37791      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37792    fi
37793  fi
37794
37795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37798  # "foo.exe" is OK but "foo" is an error.
37799  #
37800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37801  # It is also a way to make sure we got the proper file name for the real test later on.
37802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37803  if test "x$test_shortpath" = x; then
37804    # Short path failed, file does not exist as specified.
37805    # Try adding .exe or .cmd
37806    if test -f "${new_path}.exe"; then
37807      input_to_shortpath="${new_path}.exe"
37808    elif test -f "${new_path}.cmd"; then
37809      input_to_shortpath="${new_path}.cmd"
37810    else
37811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37812$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37815      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37816    fi
37817  else
37818    input_to_shortpath="$new_path"
37819  fi
37820
37821  # Call helper function which possibly converts this using DOS-style short mode.
37822  # If so, the updated path is stored in $new_path.
37823  new_path="$input_to_shortpath"
37824
37825  input_path="$input_to_shortpath"
37826  # Check if we need to convert this using DOS-style short mode. If the path
37827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37828  # take no chances and rewrite it.
37829  # Note: m4 eats our [], so we need to use [ and ] instead.
37830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37831  if test "x$has_forbidden_chars" != x; then
37832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37836      # Going to short mode and back again did indeed matter. Since short mode is
37837      # case insensitive, let's make it lowercase to improve readability.
37838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37839      # Now convert it back to Unix-style (cygpath)
37840      input_path=`$CYGPATH -u "$shortmode_path"`
37841      new_path="$input_path"
37842    fi
37843  fi
37844
37845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37846  if test "x$test_cygdrive_prefix" = x; then
37847    # As a simple fix, exclude /usr/bin since it's not a real path.
37848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37850      # a path prefixed by /cygdrive for fixpath to work.
37851      new_path="$CYGWIN_ROOT_PATH$input_path"
37852    fi
37853  fi
37854
37855  # remove trailing .exe if any
37856  new_path="${new_path/%.exe/}"
37857
37858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37859
37860  # First separate the path from the arguments. This will split at the first
37861  # space.
37862  complete="$AR"
37863  path="${complete%% *}"
37864  tmp="$complete EOL"
37865  arguments="${tmp#* }"
37866
37867  # Input might be given as Windows format, start by converting to
37868  # unix format.
37869  new_path="$path"
37870
37871  windows_path="$new_path"
37872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37873    unix_path=`$CYGPATH -u "$windows_path"`
37874    new_path="$unix_path"
37875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37877    new_path="$unix_path"
37878  fi
37879
37880
37881  # Now try to locate executable using which
37882  new_path=`$WHICH "$new_path" 2> /dev/null`
37883
37884  if test "x$new_path" = x; then
37885    # Oops. Which didn't find the executable.
37886    # The splitting of arguments from the executable at a space might have been incorrect,
37887    # since paths with space are more likely in Windows. Give it another try with the whole
37888    # argument.
37889    path="$complete"
37890    arguments="EOL"
37891    new_path="$path"
37892
37893  windows_path="$new_path"
37894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37895    unix_path=`$CYGPATH -u "$windows_path"`
37896    new_path="$unix_path"
37897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37899    new_path="$unix_path"
37900  fi
37901
37902
37903    new_path=`$WHICH "$new_path" 2> /dev/null`
37904    # bat and cmd files are not always considered executable in MSYS causing which
37905    # to not find them
37906    if test "x$new_path" = x \
37907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37909      new_path="$path"
37910
37911  windows_path="$new_path"
37912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37913    unix_path=`$CYGPATH -u "$windows_path"`
37914    new_path="$unix_path"
37915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37917    new_path="$unix_path"
37918  fi
37919
37920    fi
37921
37922    if test "x$new_path" = x; then
37923      # It's still not found. Now this is an unrecoverable error.
37924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37925$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37926      has_space=`$ECHO "$complete" | $GREP " "`
37927      if test "x$has_space" != x; then
37928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37930      fi
37931      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37932    fi
37933  fi
37934
37935  # Now new_path has a complete unix path to the binary
37936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37937    # Keep paths in /bin as-is, but remove trailing .exe if any
37938    new_path="${new_path/%.exe/}"
37939    # Do not save /bin paths to all_fixpath_prefixes!
37940  else
37941    # Not in mixed or Windows style, start by that.
37942    new_path=`cmd //c echo $new_path`
37943
37944  input_path="$new_path"
37945  # Check if we need to convert this using DOS-style short mode. If the path
37946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37947  # take no chances and rewrite it.
37948  # Note: m4 eats our [], so we need to use [ and ] instead.
37949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37950  if test "x$has_forbidden_chars" != x; then
37951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37953  fi
37954
37955    # Output is in $new_path
37956
37957  windows_path="$new_path"
37958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37959    unix_path=`$CYGPATH -u "$windows_path"`
37960    new_path="$unix_path"
37961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37963    new_path="$unix_path"
37964  fi
37965
37966    # remove trailing .exe if any
37967    new_path="${new_path/%.exe/}"
37968
37969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37971  fi
37972
37973    else
37974      # We're on a unix platform. Hooray! :)
37975      # First separate the path from the arguments. This will split at the first
37976      # space.
37977      complete="$AR"
37978      path="${complete%% *}"
37979      tmp="$complete EOL"
37980      arguments="${tmp#* }"
37981
37982      # Cannot rely on the command "which" here since it doesn't always work.
37983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37984      if test -z "$is_absolute_path"; then
37985        # Path to executable is not absolute. Find it.
37986        IFS_save="$IFS"
37987        IFS=:
37988        for p in $PATH; do
37989          if test -f "$p/$path" && test -x "$p/$path"; then
37990            new_path="$p/$path"
37991            break
37992          fi
37993        done
37994        IFS="$IFS_save"
37995      else
37996        # This is an absolute path, we can use it without further modifications.
37997        new_path="$path"
37998      fi
37999
38000      if test "x$new_path" = x; then
38001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38002$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38003        has_space=`$ECHO "$complete" | $GREP " "`
38004        if test "x$has_space" != x; then
38005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38007        fi
38008        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38009      fi
38010    fi
38011
38012    # Now join together the path and the arguments once again
38013    if test "x$arguments" != xEOL; then
38014      new_complete="$new_path ${arguments% *}"
38015    else
38016      new_complete="$new_path"
38017    fi
38018
38019    if test "x$complete" != "x$new_complete"; then
38020      AR="$new_complete"
38021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38022$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38023    fi
38024  fi
38025
38026
38027
38028  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38029
38030
38031  # Publish this variable in the help.
38032
38033
38034  if [ -z "${LIPO+x}" ]; then
38035    # The variable is not set by user, try to locate tool using the code snippet
38036    for ac_prog in lipo
38037do
38038  # Extract the first word of "$ac_prog", so it can be a program name with args.
38039set dummy $ac_prog; ac_word=$2
38040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38041$as_echo_n "checking for $ac_word... " >&6; }
38042if ${ac_cv_path_LIPO+:} false; then :
38043  $as_echo_n "(cached) " >&6
38044else
38045  case $LIPO in
38046  [\\/]* | ?:[\\/]*)
38047  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38048  ;;
38049  *)
38050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38051for as_dir in $PATH
38052do
38053  IFS=$as_save_IFS
38054  test -z "$as_dir" && as_dir=.
38055    for ac_exec_ext in '' $ac_executable_extensions; do
38056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38057    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38059    break 2
38060  fi
38061done
38062  done
38063IFS=$as_save_IFS
38064
38065  ;;
38066esac
38067fi
38068LIPO=$ac_cv_path_LIPO
38069if test -n "$LIPO"; then
38070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38071$as_echo "$LIPO" >&6; }
38072else
38073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38074$as_echo "no" >&6; }
38075fi
38076
38077
38078  test -n "$LIPO" && break
38079done
38080
38081  else
38082    # The variable is set, but is it from the command line or the environment?
38083
38084    # Try to remove the string !LIPO! from our list.
38085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38087      # If it failed, the variable was not from the command line. Ignore it,
38088      # but warn the user (except for BASH, which is always set by the calling BASH).
38089      if test "xLIPO" != xBASH; then
38090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38091$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38092      fi
38093      # Try to locate tool using the code snippet
38094      for ac_prog in lipo
38095do
38096  # Extract the first word of "$ac_prog", so it can be a program name with args.
38097set dummy $ac_prog; ac_word=$2
38098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38099$as_echo_n "checking for $ac_word... " >&6; }
38100if ${ac_cv_path_LIPO+:} false; then :
38101  $as_echo_n "(cached) " >&6
38102else
38103  case $LIPO in
38104  [\\/]* | ?:[\\/]*)
38105  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38106  ;;
38107  *)
38108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38109for as_dir in $PATH
38110do
38111  IFS=$as_save_IFS
38112  test -z "$as_dir" && as_dir=.
38113    for ac_exec_ext in '' $ac_executable_extensions; do
38114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38115    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38117    break 2
38118  fi
38119done
38120  done
38121IFS=$as_save_IFS
38122
38123  ;;
38124esac
38125fi
38126LIPO=$ac_cv_path_LIPO
38127if test -n "$LIPO"; then
38128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38129$as_echo "$LIPO" >&6; }
38130else
38131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38132$as_echo "no" >&6; }
38133fi
38134
38135
38136  test -n "$LIPO" && break
38137done
38138
38139    else
38140      # If it succeeded, then it was overridden by the user. We will use it
38141      # for the tool.
38142
38143      # First remove it from the list of overridden variables, so we can test
38144      # for unknown variables in the end.
38145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38146
38147      # Check if we try to supply an empty value
38148      if test "x$LIPO" = x; then
38149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38150$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38152$as_echo_n "checking for LIPO... " >&6; }
38153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38154$as_echo "disabled" >&6; }
38155      else
38156        # Check if the provided tool contains a complete path.
38157        tool_specified="$LIPO"
38158        tool_basename="${tool_specified##*/}"
38159        if test "x$tool_basename" = "x$tool_specified"; then
38160          # A command without a complete path is provided, search $PATH.
38161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38162$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38163          # Extract the first word of "$tool_basename", so it can be a program name with args.
38164set dummy $tool_basename; ac_word=$2
38165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38166$as_echo_n "checking for $ac_word... " >&6; }
38167if ${ac_cv_path_LIPO+:} false; then :
38168  $as_echo_n "(cached) " >&6
38169else
38170  case $LIPO in
38171  [\\/]* | ?:[\\/]*)
38172  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38173  ;;
38174  *)
38175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38176for as_dir in $PATH
38177do
38178  IFS=$as_save_IFS
38179  test -z "$as_dir" && as_dir=.
38180    for ac_exec_ext in '' $ac_executable_extensions; do
38181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38182    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38184    break 2
38185  fi
38186done
38187  done
38188IFS=$as_save_IFS
38189
38190  ;;
38191esac
38192fi
38193LIPO=$ac_cv_path_LIPO
38194if test -n "$LIPO"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38196$as_echo "$LIPO" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203          if test "x$LIPO" = x; then
38204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38205          fi
38206        else
38207          # Otherwise we believe it is a complete path. Use it as it is.
38208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38209$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38211$as_echo_n "checking for LIPO... " >&6; }
38212          if test ! -x "$tool_specified"; then
38213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38214$as_echo "not found" >&6; }
38215            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38216          fi
38217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38218$as_echo "$tool_specified" >&6; }
38219        fi
38220      fi
38221    fi
38222
38223  fi
38224
38225
38226
38227  # Only process if variable expands to non-empty
38228
38229  if test "x$LIPO" != x; then
38230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38231
38232  # First separate the path from the arguments. This will split at the first
38233  # space.
38234  complete="$LIPO"
38235  path="${complete%% *}"
38236  tmp="$complete EOL"
38237  arguments="${tmp#* }"
38238
38239  # Input might be given as Windows format, start by converting to
38240  # unix format.
38241  new_path=`$CYGPATH -u "$path"`
38242
38243  # Now try to locate executable using which
38244  new_path=`$WHICH "$new_path" 2> /dev/null`
38245  # bat and cmd files are not always considered executable in cygwin causing which
38246  # to not find them
38247  if test "x$new_path" = x \
38248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38250    new_path=`$CYGPATH -u "$path"`
38251  fi
38252  if test "x$new_path" = x; then
38253    # Oops. Which didn't find the executable.
38254    # The splitting of arguments from the executable at a space might have been incorrect,
38255    # since paths with space are more likely in Windows. Give it another try with the whole
38256    # argument.
38257    path="$complete"
38258    arguments="EOL"
38259    new_path=`$CYGPATH -u "$path"`
38260    new_path=`$WHICH "$new_path" 2> /dev/null`
38261    # bat and cmd files are not always considered executable in cygwin causing which
38262    # to not find them
38263    if test "x$new_path" = x \
38264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38266      new_path=`$CYGPATH -u "$path"`
38267    fi
38268    if test "x$new_path" = x; then
38269      # It's still not found. Now this is an unrecoverable error.
38270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38271$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38272      has_space=`$ECHO "$complete" | $GREP " "`
38273      if test "x$has_space" != x; then
38274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38276      fi
38277      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38278    fi
38279  fi
38280
38281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38284  # "foo.exe" is OK but "foo" is an error.
38285  #
38286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38287  # It is also a way to make sure we got the proper file name for the real test later on.
38288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38289  if test "x$test_shortpath" = x; then
38290    # Short path failed, file does not exist as specified.
38291    # Try adding .exe or .cmd
38292    if test -f "${new_path}.exe"; then
38293      input_to_shortpath="${new_path}.exe"
38294    elif test -f "${new_path}.cmd"; then
38295      input_to_shortpath="${new_path}.cmd"
38296    else
38297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38298$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38301      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38302    fi
38303  else
38304    input_to_shortpath="$new_path"
38305  fi
38306
38307  # Call helper function which possibly converts this using DOS-style short mode.
38308  # If so, the updated path is stored in $new_path.
38309  new_path="$input_to_shortpath"
38310
38311  input_path="$input_to_shortpath"
38312  # Check if we need to convert this using DOS-style short mode. If the path
38313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38314  # take no chances and rewrite it.
38315  # Note: m4 eats our [], so we need to use [ and ] instead.
38316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38317  if test "x$has_forbidden_chars" != x; then
38318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38322      # Going to short mode and back again did indeed matter. Since short mode is
38323      # case insensitive, let's make it lowercase to improve readability.
38324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38325      # Now convert it back to Unix-style (cygpath)
38326      input_path=`$CYGPATH -u "$shortmode_path"`
38327      new_path="$input_path"
38328    fi
38329  fi
38330
38331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38332  if test "x$test_cygdrive_prefix" = x; then
38333    # As a simple fix, exclude /usr/bin since it's not a real path.
38334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38336      # a path prefixed by /cygdrive for fixpath to work.
38337      new_path="$CYGWIN_ROOT_PATH$input_path"
38338    fi
38339  fi
38340
38341  # remove trailing .exe if any
38342  new_path="${new_path/%.exe/}"
38343
38344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38345
38346  # First separate the path from the arguments. This will split at the first
38347  # space.
38348  complete="$LIPO"
38349  path="${complete%% *}"
38350  tmp="$complete EOL"
38351  arguments="${tmp#* }"
38352
38353  # Input might be given as Windows format, start by converting to
38354  # unix format.
38355  new_path="$path"
38356
38357  windows_path="$new_path"
38358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38359    unix_path=`$CYGPATH -u "$windows_path"`
38360    new_path="$unix_path"
38361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38363    new_path="$unix_path"
38364  fi
38365
38366
38367  # Now try to locate executable using which
38368  new_path=`$WHICH "$new_path" 2> /dev/null`
38369
38370  if test "x$new_path" = x; then
38371    # Oops. Which didn't find the executable.
38372    # The splitting of arguments from the executable at a space might have been incorrect,
38373    # since paths with space are more likely in Windows. Give it another try with the whole
38374    # argument.
38375    path="$complete"
38376    arguments="EOL"
38377    new_path="$path"
38378
38379  windows_path="$new_path"
38380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38381    unix_path=`$CYGPATH -u "$windows_path"`
38382    new_path="$unix_path"
38383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38385    new_path="$unix_path"
38386  fi
38387
38388
38389    new_path=`$WHICH "$new_path" 2> /dev/null`
38390    # bat and cmd files are not always considered executable in MSYS causing which
38391    # to not find them
38392    if test "x$new_path" = x \
38393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38395      new_path="$path"
38396
38397  windows_path="$new_path"
38398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38399    unix_path=`$CYGPATH -u "$windows_path"`
38400    new_path="$unix_path"
38401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38403    new_path="$unix_path"
38404  fi
38405
38406    fi
38407
38408    if test "x$new_path" = x; then
38409      # It's still not found. Now this is an unrecoverable error.
38410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38411$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38412      has_space=`$ECHO "$complete" | $GREP " "`
38413      if test "x$has_space" != x; then
38414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38416      fi
38417      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38418    fi
38419  fi
38420
38421  # Now new_path has a complete unix path to the binary
38422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38423    # Keep paths in /bin as-is, but remove trailing .exe if any
38424    new_path="${new_path/%.exe/}"
38425    # Do not save /bin paths to all_fixpath_prefixes!
38426  else
38427    # Not in mixed or Windows style, start by that.
38428    new_path=`cmd //c echo $new_path`
38429
38430  input_path="$new_path"
38431  # Check if we need to convert this using DOS-style short mode. If the path
38432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38433  # take no chances and rewrite it.
38434  # Note: m4 eats our [], so we need to use [ and ] instead.
38435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38436  if test "x$has_forbidden_chars" != x; then
38437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38439  fi
38440
38441    # Output is in $new_path
38442
38443  windows_path="$new_path"
38444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38445    unix_path=`$CYGPATH -u "$windows_path"`
38446    new_path="$unix_path"
38447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38449    new_path="$unix_path"
38450  fi
38451
38452    # remove trailing .exe if any
38453    new_path="${new_path/%.exe/}"
38454
38455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38457  fi
38458
38459    else
38460      # We're on a unix platform. Hooray! :)
38461      # First separate the path from the arguments. This will split at the first
38462      # space.
38463      complete="$LIPO"
38464      path="${complete%% *}"
38465      tmp="$complete EOL"
38466      arguments="${tmp#* }"
38467
38468      # Cannot rely on the command "which" here since it doesn't always work.
38469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38470      if test -z "$is_absolute_path"; then
38471        # Path to executable is not absolute. Find it.
38472        IFS_save="$IFS"
38473        IFS=:
38474        for p in $PATH; do
38475          if test -f "$p/$path" && test -x "$p/$path"; then
38476            new_path="$p/$path"
38477            break
38478          fi
38479        done
38480        IFS="$IFS_save"
38481      else
38482        # This is an absolute path, we can use it without further modifications.
38483        new_path="$path"
38484      fi
38485
38486      if test "x$new_path" = x; then
38487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38488$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38489        has_space=`$ECHO "$complete" | $GREP " "`
38490        if test "x$has_space" != x; then
38491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38493        fi
38494        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38495      fi
38496    fi
38497
38498    # Now join together the path and the arguments once again
38499    if test "x$arguments" != xEOL; then
38500      new_complete="$new_path ${arguments% *}"
38501    else
38502      new_complete="$new_path"
38503    fi
38504
38505    if test "x$complete" != "x$new_complete"; then
38506      LIPO="$new_complete"
38507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38508$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38509    fi
38510  fi
38511
38512  fi
38513
38514  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38515    # Extract the first word of "mt", so it can be a program name with args.
38516set dummy mt; ac_word=$2
38517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38518$as_echo_n "checking for $ac_word... " >&6; }
38519if ${ac_cv_prog_MT+:} false; then :
38520  $as_echo_n "(cached) " >&6
38521else
38522  if test -n "$MT"; then
38523  ac_cv_prog_MT="$MT" # Let the user override the test.
38524else
38525  ac_prog_rejected=no
38526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38527for as_dir in $PATH
38528do
38529  IFS=$as_save_IFS
38530  test -z "$as_dir" && as_dir=.
38531    for ac_exec_ext in '' $ac_executable_extensions; do
38532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38533    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38534       ac_prog_rejected=yes
38535       continue
38536     fi
38537    ac_cv_prog_MT="mt"
38538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38539    break 2
38540  fi
38541done
38542  done
38543IFS=$as_save_IFS
38544
38545if test $ac_prog_rejected = yes; then
38546  # We found a bogon in the path, so make sure we never use it.
38547  set dummy $ac_cv_prog_MT
38548  shift
38549  if test $# != 0; then
38550    # We chose a different compiler from the bogus one.
38551    # However, it has the same basename, so the bogon will be chosen
38552    # first if we set MT to just the basename; use the full file name.
38553    shift
38554    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38555  fi
38556fi
38557fi
38558fi
38559MT=$ac_cv_prog_MT
38560if test -n "$MT"; then
38561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38562$as_echo "$MT" >&6; }
38563else
38564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38565$as_echo "no" >&6; }
38566fi
38567
38568
38569
38570  # Only process if variable expands to non-empty
38571
38572  if test "x$MT" != x; then
38573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38574
38575  # First separate the path from the arguments. This will split at the first
38576  # space.
38577  complete="$MT"
38578  path="${complete%% *}"
38579  tmp="$complete EOL"
38580  arguments="${tmp#* }"
38581
38582  # Input might be given as Windows format, start by converting to
38583  # unix format.
38584  new_path=`$CYGPATH -u "$path"`
38585
38586  # Now try to locate executable using which
38587  new_path=`$WHICH "$new_path" 2> /dev/null`
38588  # bat and cmd files are not always considered executable in cygwin causing which
38589  # to not find them
38590  if test "x$new_path" = x \
38591      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38592      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38593    new_path=`$CYGPATH -u "$path"`
38594  fi
38595  if test "x$new_path" = x; then
38596    # Oops. Which didn't find the executable.
38597    # The splitting of arguments from the executable at a space might have been incorrect,
38598    # since paths with space are more likely in Windows. Give it another try with the whole
38599    # argument.
38600    path="$complete"
38601    arguments="EOL"
38602    new_path=`$CYGPATH -u "$path"`
38603    new_path=`$WHICH "$new_path" 2> /dev/null`
38604    # bat and cmd files are not always considered executable in cygwin causing which
38605    # to not find them
38606    if test "x$new_path" = x \
38607        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38608        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38609      new_path=`$CYGPATH -u "$path"`
38610    fi
38611    if test "x$new_path" = x; then
38612      # It's still not found. Now this is an unrecoverable error.
38613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38614$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38615      has_space=`$ECHO "$complete" | $GREP " "`
38616      if test "x$has_space" != x; then
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38619      fi
38620      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38621    fi
38622  fi
38623
38624  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38625  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38626  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38627  # "foo.exe" is OK but "foo" is an error.
38628  #
38629  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38630  # It is also a way to make sure we got the proper file name for the real test later on.
38631  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38632  if test "x$test_shortpath" = x; then
38633    # Short path failed, file does not exist as specified.
38634    # Try adding .exe or .cmd
38635    if test -f "${new_path}.exe"; then
38636      input_to_shortpath="${new_path}.exe"
38637    elif test -f "${new_path}.cmd"; then
38638      input_to_shortpath="${new_path}.cmd"
38639    else
38640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38641$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38642      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38643$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38644      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38645    fi
38646  else
38647    input_to_shortpath="$new_path"
38648  fi
38649
38650  # Call helper function which possibly converts this using DOS-style short mode.
38651  # If so, the updated path is stored in $new_path.
38652  new_path="$input_to_shortpath"
38653
38654  input_path="$input_to_shortpath"
38655  # Check if we need to convert this using DOS-style short mode. If the path
38656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38657  # take no chances and rewrite it.
38658  # Note: m4 eats our [], so we need to use [ and ] instead.
38659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38660  if test "x$has_forbidden_chars" != x; then
38661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38665      # Going to short mode and back again did indeed matter. Since short mode is
38666      # case insensitive, let's make it lowercase to improve readability.
38667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38668      # Now convert it back to Unix-style (cygpath)
38669      input_path=`$CYGPATH -u "$shortmode_path"`
38670      new_path="$input_path"
38671    fi
38672  fi
38673
38674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38675  if test "x$test_cygdrive_prefix" = x; then
38676    # As a simple fix, exclude /usr/bin since it's not a real path.
38677    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38679      # a path prefixed by /cygdrive for fixpath to work.
38680      new_path="$CYGWIN_ROOT_PATH$input_path"
38681    fi
38682  fi
38683
38684  # remove trailing .exe if any
38685  new_path="${new_path/%.exe/}"
38686
38687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38688
38689  # First separate the path from the arguments. This will split at the first
38690  # space.
38691  complete="$MT"
38692  path="${complete%% *}"
38693  tmp="$complete EOL"
38694  arguments="${tmp#* }"
38695
38696  # Input might be given as Windows format, start by converting to
38697  # unix format.
38698  new_path="$path"
38699
38700  windows_path="$new_path"
38701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38702    unix_path=`$CYGPATH -u "$windows_path"`
38703    new_path="$unix_path"
38704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38706    new_path="$unix_path"
38707  fi
38708
38709
38710  # Now try to locate executable using which
38711  new_path=`$WHICH "$new_path" 2> /dev/null`
38712
38713  if test "x$new_path" = x; then
38714    # Oops. Which didn't find the executable.
38715    # The splitting of arguments from the executable at a space might have been incorrect,
38716    # since paths with space are more likely in Windows. Give it another try with the whole
38717    # argument.
38718    path="$complete"
38719    arguments="EOL"
38720    new_path="$path"
38721
38722  windows_path="$new_path"
38723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38724    unix_path=`$CYGPATH -u "$windows_path"`
38725    new_path="$unix_path"
38726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38728    new_path="$unix_path"
38729  fi
38730
38731
38732    new_path=`$WHICH "$new_path" 2> /dev/null`
38733    # bat and cmd files are not always considered executable in MSYS causing which
38734    # to not find them
38735    if test "x$new_path" = x \
38736        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38737        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38738      new_path="$path"
38739
38740  windows_path="$new_path"
38741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38742    unix_path=`$CYGPATH -u "$windows_path"`
38743    new_path="$unix_path"
38744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38746    new_path="$unix_path"
38747  fi
38748
38749    fi
38750
38751    if test "x$new_path" = x; then
38752      # It's still not found. Now this is an unrecoverable error.
38753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38754$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38755      has_space=`$ECHO "$complete" | $GREP " "`
38756      if test "x$has_space" != x; then
38757        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38758$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38759      fi
38760      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38761    fi
38762  fi
38763
38764  # Now new_path has a complete unix path to the binary
38765  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38766    # Keep paths in /bin as-is, but remove trailing .exe if any
38767    new_path="${new_path/%.exe/}"
38768    # Do not save /bin paths to all_fixpath_prefixes!
38769  else
38770    # Not in mixed or Windows style, start by that.
38771    new_path=`cmd //c echo $new_path`
38772
38773  input_path="$new_path"
38774  # Check if we need to convert this using DOS-style short mode. If the path
38775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38776  # take no chances and rewrite it.
38777  # Note: m4 eats our [], so we need to use [ and ] instead.
38778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38779  if test "x$has_forbidden_chars" != x; then
38780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38782  fi
38783
38784    # Output is in $new_path
38785
38786  windows_path="$new_path"
38787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38788    unix_path=`$CYGPATH -u "$windows_path"`
38789    new_path="$unix_path"
38790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38792    new_path="$unix_path"
38793  fi
38794
38795    # remove trailing .exe if any
38796    new_path="${new_path/%.exe/}"
38797
38798    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38799    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38800  fi
38801
38802    else
38803      # We're on a unix platform. Hooray! :)
38804      # First separate the path from the arguments. This will split at the first
38805      # space.
38806      complete="$MT"
38807      path="${complete%% *}"
38808      tmp="$complete EOL"
38809      arguments="${tmp#* }"
38810
38811      # Cannot rely on the command "which" here since it doesn't always work.
38812      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38813      if test -z "$is_absolute_path"; then
38814        # Path to executable is not absolute. Find it.
38815        IFS_save="$IFS"
38816        IFS=:
38817        for p in $PATH; do
38818          if test -f "$p/$path" && test -x "$p/$path"; then
38819            new_path="$p/$path"
38820            break
38821          fi
38822        done
38823        IFS="$IFS_save"
38824      else
38825        # This is an absolute path, we can use it without further modifications.
38826        new_path="$path"
38827      fi
38828
38829      if test "x$new_path" = x; then
38830        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38831$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38832        has_space=`$ECHO "$complete" | $GREP " "`
38833        if test "x$has_space" != x; then
38834          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38835$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38836        fi
38837        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38838      fi
38839    fi
38840
38841    # Now join together the path and the arguments once again
38842    if test "x$arguments" != xEOL; then
38843      new_complete="$new_path ${arguments% *}"
38844    else
38845      new_complete="$new_path"
38846    fi
38847
38848    if test "x$complete" != "x$new_complete"; then
38849      MT="$new_complete"
38850      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38851$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38852    fi
38853  fi
38854
38855    # Setup the resource compiler (RC)
38856    # Extract the first word of "rc", so it can be a program name with args.
38857set dummy rc; ac_word=$2
38858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38859$as_echo_n "checking for $ac_word... " >&6; }
38860if ${ac_cv_prog_RC+:} false; then :
38861  $as_echo_n "(cached) " >&6
38862else
38863  if test -n "$RC"; then
38864  ac_cv_prog_RC="$RC" # Let the user override the test.
38865else
38866  ac_prog_rejected=no
38867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38868for as_dir in $PATH
38869do
38870  IFS=$as_save_IFS
38871  test -z "$as_dir" && as_dir=.
38872    for ac_exec_ext in '' $ac_executable_extensions; do
38873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38874    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38875       ac_prog_rejected=yes
38876       continue
38877     fi
38878    ac_cv_prog_RC="rc"
38879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38880    break 2
38881  fi
38882done
38883  done
38884IFS=$as_save_IFS
38885
38886if test $ac_prog_rejected = yes; then
38887  # We found a bogon in the path, so make sure we never use it.
38888  set dummy $ac_cv_prog_RC
38889  shift
38890  if test $# != 0; then
38891    # We chose a different compiler from the bogus one.
38892    # However, it has the same basename, so the bogon will be chosen
38893    # first if we set RC to just the basename; use the full file name.
38894    shift
38895    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38896  fi
38897fi
38898fi
38899fi
38900RC=$ac_cv_prog_RC
38901if test -n "$RC"; then
38902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38903$as_echo "$RC" >&6; }
38904else
38905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38906$as_echo "no" >&6; }
38907fi
38908
38909
38910
38911  # Only process if variable expands to non-empty
38912
38913  if test "x$RC" != x; then
38914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38915
38916  # First separate the path from the arguments. This will split at the first
38917  # space.
38918  complete="$RC"
38919  path="${complete%% *}"
38920  tmp="$complete EOL"
38921  arguments="${tmp#* }"
38922
38923  # Input might be given as Windows format, start by converting to
38924  # unix format.
38925  new_path=`$CYGPATH -u "$path"`
38926
38927  # Now try to locate executable using which
38928  new_path=`$WHICH "$new_path" 2> /dev/null`
38929  # bat and cmd files are not always considered executable in cygwin causing which
38930  # to not find them
38931  if test "x$new_path" = x \
38932      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38933      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38934    new_path=`$CYGPATH -u "$path"`
38935  fi
38936  if test "x$new_path" = x; then
38937    # Oops. Which didn't find the executable.
38938    # The splitting of arguments from the executable at a space might have been incorrect,
38939    # since paths with space are more likely in Windows. Give it another try with the whole
38940    # argument.
38941    path="$complete"
38942    arguments="EOL"
38943    new_path=`$CYGPATH -u "$path"`
38944    new_path=`$WHICH "$new_path" 2> /dev/null`
38945    # bat and cmd files are not always considered executable in cygwin causing which
38946    # to not find them
38947    if test "x$new_path" = x \
38948        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38949        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38950      new_path=`$CYGPATH -u "$path"`
38951    fi
38952    if test "x$new_path" = x; then
38953      # It's still not found. Now this is an unrecoverable error.
38954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38955$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38956      has_space=`$ECHO "$complete" | $GREP " "`
38957      if test "x$has_space" != x; then
38958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38960      fi
38961      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38962    fi
38963  fi
38964
38965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38968  # "foo.exe" is OK but "foo" is an error.
38969  #
38970  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38971  # It is also a way to make sure we got the proper file name for the real test later on.
38972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38973  if test "x$test_shortpath" = x; then
38974    # Short path failed, file does not exist as specified.
38975    # Try adding .exe or .cmd
38976    if test -f "${new_path}.exe"; then
38977      input_to_shortpath="${new_path}.exe"
38978    elif test -f "${new_path}.cmd"; then
38979      input_to_shortpath="${new_path}.cmd"
38980    else
38981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38982$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38985      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38986    fi
38987  else
38988    input_to_shortpath="$new_path"
38989  fi
38990
38991  # Call helper function which possibly converts this using DOS-style short mode.
38992  # If so, the updated path is stored in $new_path.
38993  new_path="$input_to_shortpath"
38994
38995  input_path="$input_to_shortpath"
38996  # Check if we need to convert this using DOS-style short mode. If the path
38997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38998  # take no chances and rewrite it.
38999  # Note: m4 eats our [], so we need to use [ and ] instead.
39000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39001  if test "x$has_forbidden_chars" != x; then
39002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39006      # Going to short mode and back again did indeed matter. Since short mode is
39007      # case insensitive, let's make it lowercase to improve readability.
39008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39009      # Now convert it back to Unix-style (cygpath)
39010      input_path=`$CYGPATH -u "$shortmode_path"`
39011      new_path="$input_path"
39012    fi
39013  fi
39014
39015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39016  if test "x$test_cygdrive_prefix" = x; then
39017    # As a simple fix, exclude /usr/bin since it's not a real path.
39018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39020      # a path prefixed by /cygdrive for fixpath to work.
39021      new_path="$CYGWIN_ROOT_PATH$input_path"
39022    fi
39023  fi
39024
39025  # remove trailing .exe if any
39026  new_path="${new_path/%.exe/}"
39027
39028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39029
39030  # First separate the path from the arguments. This will split at the first
39031  # space.
39032  complete="$RC"
39033  path="${complete%% *}"
39034  tmp="$complete EOL"
39035  arguments="${tmp#* }"
39036
39037  # Input might be given as Windows format, start by converting to
39038  # unix format.
39039  new_path="$path"
39040
39041  windows_path="$new_path"
39042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39043    unix_path=`$CYGPATH -u "$windows_path"`
39044    new_path="$unix_path"
39045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39047    new_path="$unix_path"
39048  fi
39049
39050
39051  # Now try to locate executable using which
39052  new_path=`$WHICH "$new_path" 2> /dev/null`
39053
39054  if test "x$new_path" = x; then
39055    # Oops. Which didn't find the executable.
39056    # The splitting of arguments from the executable at a space might have been incorrect,
39057    # since paths with space are more likely in Windows. Give it another try with the whole
39058    # argument.
39059    path="$complete"
39060    arguments="EOL"
39061    new_path="$path"
39062
39063  windows_path="$new_path"
39064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39065    unix_path=`$CYGPATH -u "$windows_path"`
39066    new_path="$unix_path"
39067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39069    new_path="$unix_path"
39070  fi
39071
39072
39073    new_path=`$WHICH "$new_path" 2> /dev/null`
39074    # bat and cmd files are not always considered executable in MSYS causing which
39075    # to not find them
39076    if test "x$new_path" = x \
39077        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39078        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39079      new_path="$path"
39080
39081  windows_path="$new_path"
39082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39083    unix_path=`$CYGPATH -u "$windows_path"`
39084    new_path="$unix_path"
39085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39087    new_path="$unix_path"
39088  fi
39089
39090    fi
39091
39092    if test "x$new_path" = x; then
39093      # It's still not found. Now this is an unrecoverable error.
39094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39095$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39096      has_space=`$ECHO "$complete" | $GREP " "`
39097      if test "x$has_space" != x; then
39098        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39099$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39100      fi
39101      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39102    fi
39103  fi
39104
39105  # Now new_path has a complete unix path to the binary
39106  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39107    # Keep paths in /bin as-is, but remove trailing .exe if any
39108    new_path="${new_path/%.exe/}"
39109    # Do not save /bin paths to all_fixpath_prefixes!
39110  else
39111    # Not in mixed or Windows style, start by that.
39112    new_path=`cmd //c echo $new_path`
39113
39114  input_path="$new_path"
39115  # Check if we need to convert this using DOS-style short mode. If the path
39116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39117  # take no chances and rewrite it.
39118  # Note: m4 eats our [], so we need to use [ and ] instead.
39119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39120  if test "x$has_forbidden_chars" != x; then
39121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39123  fi
39124
39125    # Output is in $new_path
39126
39127  windows_path="$new_path"
39128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39129    unix_path=`$CYGPATH -u "$windows_path"`
39130    new_path="$unix_path"
39131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39133    new_path="$unix_path"
39134  fi
39135
39136    # remove trailing .exe if any
39137    new_path="${new_path/%.exe/}"
39138
39139    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39140    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39141  fi
39142
39143    else
39144      # We're on a unix platform. Hooray! :)
39145      # First separate the path from the arguments. This will split at the first
39146      # space.
39147      complete="$RC"
39148      path="${complete%% *}"
39149      tmp="$complete EOL"
39150      arguments="${tmp#* }"
39151
39152      # Cannot rely on the command "which" here since it doesn't always work.
39153      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39154      if test -z "$is_absolute_path"; then
39155        # Path to executable is not absolute. Find it.
39156        IFS_save="$IFS"
39157        IFS=:
39158        for p in $PATH; do
39159          if test -f "$p/$path" && test -x "$p/$path"; then
39160            new_path="$p/$path"
39161            break
39162          fi
39163        done
39164        IFS="$IFS_save"
39165      else
39166        # This is an absolute path, we can use it without further modifications.
39167        new_path="$path"
39168      fi
39169
39170      if test "x$new_path" = x; then
39171        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39172$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39173        has_space=`$ECHO "$complete" | $GREP " "`
39174        if test "x$has_space" != x; then
39175          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39176$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39177        fi
39178        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39179      fi
39180    fi
39181
39182    # Now join together the path and the arguments once again
39183    if test "x$arguments" != xEOL; then
39184      new_complete="$new_path ${arguments% *}"
39185    else
39186      new_complete="$new_path"
39187    fi
39188
39189    if test "x$complete" != "x$new_complete"; then
39190      RC="$new_complete"
39191      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39192$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39193    fi
39194  fi
39195
39196    # Extract the first word of "dumpbin", so it can be a program name with args.
39197set dummy dumpbin; ac_word=$2
39198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39199$as_echo_n "checking for $ac_word... " >&6; }
39200if ${ac_cv_prog_DUMPBIN+:} false; then :
39201  $as_echo_n "(cached) " >&6
39202else
39203  if test -n "$DUMPBIN"; then
39204  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39205else
39206as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39207for as_dir in $PATH
39208do
39209  IFS=$as_save_IFS
39210  test -z "$as_dir" && as_dir=.
39211    for ac_exec_ext in '' $ac_executable_extensions; do
39212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39213    ac_cv_prog_DUMPBIN="dumpbin"
39214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39215    break 2
39216  fi
39217done
39218  done
39219IFS=$as_save_IFS
39220
39221fi
39222fi
39223DUMPBIN=$ac_cv_prog_DUMPBIN
39224if test -n "$DUMPBIN"; then
39225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39226$as_echo "$DUMPBIN" >&6; }
39227else
39228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39229$as_echo "no" >&6; }
39230fi
39231
39232
39233
39234  # Only process if variable expands to non-empty
39235
39236  if test "x$DUMPBIN" != x; then
39237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39238
39239  # First separate the path from the arguments. This will split at the first
39240  # space.
39241  complete="$DUMPBIN"
39242  path="${complete%% *}"
39243  tmp="$complete EOL"
39244  arguments="${tmp#* }"
39245
39246  # Input might be given as Windows format, start by converting to
39247  # unix format.
39248  new_path=`$CYGPATH -u "$path"`
39249
39250  # Now try to locate executable using which
39251  new_path=`$WHICH "$new_path" 2> /dev/null`
39252  # bat and cmd files are not always considered executable in cygwin causing which
39253  # to not find them
39254  if test "x$new_path" = x \
39255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39257    new_path=`$CYGPATH -u "$path"`
39258  fi
39259  if test "x$new_path" = x; then
39260    # Oops. Which didn't find the executable.
39261    # The splitting of arguments from the executable at a space might have been incorrect,
39262    # since paths with space are more likely in Windows. Give it another try with the whole
39263    # argument.
39264    path="$complete"
39265    arguments="EOL"
39266    new_path=`$CYGPATH -u "$path"`
39267    new_path=`$WHICH "$new_path" 2> /dev/null`
39268    # bat and cmd files are not always considered executable in cygwin causing which
39269    # to not find them
39270    if test "x$new_path" = x \
39271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39273      new_path=`$CYGPATH -u "$path"`
39274    fi
39275    if test "x$new_path" = x; then
39276      # It's still not found. Now this is an unrecoverable error.
39277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39278$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39279      has_space=`$ECHO "$complete" | $GREP " "`
39280      if test "x$has_space" != x; then
39281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39283      fi
39284      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39285    fi
39286  fi
39287
39288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39291  # "foo.exe" is OK but "foo" is an error.
39292  #
39293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39294  # It is also a way to make sure we got the proper file name for the real test later on.
39295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39296  if test "x$test_shortpath" = x; then
39297    # Short path failed, file does not exist as specified.
39298    # Try adding .exe or .cmd
39299    if test -f "${new_path}.exe"; then
39300      input_to_shortpath="${new_path}.exe"
39301    elif test -f "${new_path}.cmd"; then
39302      input_to_shortpath="${new_path}.cmd"
39303    else
39304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39305$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39308      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39309    fi
39310  else
39311    input_to_shortpath="$new_path"
39312  fi
39313
39314  # Call helper function which possibly converts this using DOS-style short mode.
39315  # If so, the updated path is stored in $new_path.
39316  new_path="$input_to_shortpath"
39317
39318  input_path="$input_to_shortpath"
39319  # Check if we need to convert this using DOS-style short mode. If the path
39320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39321  # take no chances and rewrite it.
39322  # Note: m4 eats our [], so we need to use [ and ] instead.
39323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39324  if test "x$has_forbidden_chars" != x; then
39325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39329      # Going to short mode and back again did indeed matter. Since short mode is
39330      # case insensitive, let's make it lowercase to improve readability.
39331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39332      # Now convert it back to Unix-style (cygpath)
39333      input_path=`$CYGPATH -u "$shortmode_path"`
39334      new_path="$input_path"
39335    fi
39336  fi
39337
39338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39339  if test "x$test_cygdrive_prefix" = x; then
39340    # As a simple fix, exclude /usr/bin since it's not a real path.
39341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39343      # a path prefixed by /cygdrive for fixpath to work.
39344      new_path="$CYGWIN_ROOT_PATH$input_path"
39345    fi
39346  fi
39347
39348  # remove trailing .exe if any
39349  new_path="${new_path/%.exe/}"
39350
39351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39352
39353  # First separate the path from the arguments. This will split at the first
39354  # space.
39355  complete="$DUMPBIN"
39356  path="${complete%% *}"
39357  tmp="$complete EOL"
39358  arguments="${tmp#* }"
39359
39360  # Input might be given as Windows format, start by converting to
39361  # unix format.
39362  new_path="$path"
39363
39364  windows_path="$new_path"
39365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39366    unix_path=`$CYGPATH -u "$windows_path"`
39367    new_path="$unix_path"
39368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39370    new_path="$unix_path"
39371  fi
39372
39373
39374  # Now try to locate executable using which
39375  new_path=`$WHICH "$new_path" 2> /dev/null`
39376
39377  if test "x$new_path" = x; then
39378    # Oops. Which didn't find the executable.
39379    # The splitting of arguments from the executable at a space might have been incorrect,
39380    # since paths with space are more likely in Windows. Give it another try with the whole
39381    # argument.
39382    path="$complete"
39383    arguments="EOL"
39384    new_path="$path"
39385
39386  windows_path="$new_path"
39387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39388    unix_path=`$CYGPATH -u "$windows_path"`
39389    new_path="$unix_path"
39390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39392    new_path="$unix_path"
39393  fi
39394
39395
39396    new_path=`$WHICH "$new_path" 2> /dev/null`
39397    # bat and cmd files are not always considered executable in MSYS causing which
39398    # to not find them
39399    if test "x$new_path" = x \
39400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39402      new_path="$path"
39403
39404  windows_path="$new_path"
39405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39406    unix_path=`$CYGPATH -u "$windows_path"`
39407    new_path="$unix_path"
39408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39410    new_path="$unix_path"
39411  fi
39412
39413    fi
39414
39415    if test "x$new_path" = x; then
39416      # It's still not found. Now this is an unrecoverable error.
39417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39418$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39419      has_space=`$ECHO "$complete" | $GREP " "`
39420      if test "x$has_space" != x; then
39421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39423      fi
39424      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39425    fi
39426  fi
39427
39428  # Now new_path has a complete unix path to the binary
39429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39430    # Keep paths in /bin as-is, but remove trailing .exe if any
39431    new_path="${new_path/%.exe/}"
39432    # Do not save /bin paths to all_fixpath_prefixes!
39433  else
39434    # Not in mixed or Windows style, start by that.
39435    new_path=`cmd //c echo $new_path`
39436
39437  input_path="$new_path"
39438  # Check if we need to convert this using DOS-style short mode. If the path
39439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39440  # take no chances and rewrite it.
39441  # Note: m4 eats our [], so we need to use [ and ] instead.
39442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39443  if test "x$has_forbidden_chars" != x; then
39444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39446  fi
39447
39448    # Output is in $new_path
39449
39450  windows_path="$new_path"
39451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39452    unix_path=`$CYGPATH -u "$windows_path"`
39453    new_path="$unix_path"
39454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39456    new_path="$unix_path"
39457  fi
39458
39459    # remove trailing .exe if any
39460    new_path="${new_path/%.exe/}"
39461
39462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39464  fi
39465
39466    else
39467      # We're on a unix platform. Hooray! :)
39468      # First separate the path from the arguments. This will split at the first
39469      # space.
39470      complete="$DUMPBIN"
39471      path="${complete%% *}"
39472      tmp="$complete EOL"
39473      arguments="${tmp#* }"
39474
39475      # Cannot rely on the command "which" here since it doesn't always work.
39476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39477      if test -z "$is_absolute_path"; then
39478        # Path to executable is not absolute. Find it.
39479        IFS_save="$IFS"
39480        IFS=:
39481        for p in $PATH; do
39482          if test -f "$p/$path" && test -x "$p/$path"; then
39483            new_path="$p/$path"
39484            break
39485          fi
39486        done
39487        IFS="$IFS_save"
39488      else
39489        # This is an absolute path, we can use it without further modifications.
39490        new_path="$path"
39491      fi
39492
39493      if test "x$new_path" = x; then
39494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39495$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39496        has_space=`$ECHO "$complete" | $GREP " "`
39497        if test "x$has_space" != x; then
39498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39500        fi
39501        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39502      fi
39503    fi
39504
39505    # Now join together the path and the arguments once again
39506    if test "x$arguments" != xEOL; then
39507      new_complete="$new_path ${arguments% *}"
39508    else
39509      new_complete="$new_path"
39510    fi
39511
39512    if test "x$complete" != "x$new_complete"; then
39513      DUMPBIN="$new_complete"
39514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39515$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39516    fi
39517  fi
39518
39519    # We need to check for 'msbuild.exe' because at the place where we expect to
39520    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39521    # won't find the 'msbuild.exe' executable in that case (and the
39522    # 'ac_executable_extensions' is unusable due to performance reasons).
39523    # Notice that we intentionally don't fix up the path to MSBUILD because we
39524    # will call it in a DOS shell during freetype detection on Windows (see
39525    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39526    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39527set dummy msbuild.exe; ac_word=$2
39528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39529$as_echo_n "checking for $ac_word... " >&6; }
39530if ${ac_cv_prog_MSBUILD+:} false; then :
39531  $as_echo_n "(cached) " >&6
39532else
39533  if test -n "$MSBUILD"; then
39534  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39535else
39536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39537for as_dir in $PATH
39538do
39539  IFS=$as_save_IFS
39540  test -z "$as_dir" && as_dir=.
39541    for ac_exec_ext in '' $ac_executable_extensions; do
39542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39543    ac_cv_prog_MSBUILD="msbuild.exe"
39544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39545    break 2
39546  fi
39547done
39548  done
39549IFS=$as_save_IFS
39550
39551fi
39552fi
39553MSBUILD=$ac_cv_prog_MSBUILD
39554if test -n "$MSBUILD"; then
39555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39556$as_echo "$MSBUILD" >&6; }
39557else
39558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39559$as_echo "no" >&6; }
39560fi
39561
39562
39563  fi
39564
39565  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39566
39567
39568  # Publish this variable in the help.
39569
39570
39571  if [ -z "${STRIP+x}" ]; then
39572    # The variable is not set by user, try to locate tool using the code snippet
39573    for ac_prog in strip
39574do
39575  # Extract the first word of "$ac_prog", so it can be a program name with args.
39576set dummy $ac_prog; ac_word=$2
39577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39578$as_echo_n "checking for $ac_word... " >&6; }
39579if ${ac_cv_path_STRIP+:} false; then :
39580  $as_echo_n "(cached) " >&6
39581else
39582  case $STRIP in
39583  [\\/]* | ?:[\\/]*)
39584  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39585  ;;
39586  *)
39587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39588for as_dir in $PATH
39589do
39590  IFS=$as_save_IFS
39591  test -z "$as_dir" && as_dir=.
39592    for ac_exec_ext in '' $ac_executable_extensions; do
39593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39594    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39596    break 2
39597  fi
39598done
39599  done
39600IFS=$as_save_IFS
39601
39602  ;;
39603esac
39604fi
39605STRIP=$ac_cv_path_STRIP
39606if test -n "$STRIP"; then
39607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39608$as_echo "$STRIP" >&6; }
39609else
39610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39611$as_echo "no" >&6; }
39612fi
39613
39614
39615  test -n "$STRIP" && break
39616done
39617
39618  else
39619    # The variable is set, but is it from the command line or the environment?
39620
39621    # Try to remove the string !STRIP! from our list.
39622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39624      # If it failed, the variable was not from the command line. Ignore it,
39625      # but warn the user (except for BASH, which is always set by the calling BASH).
39626      if test "xSTRIP" != xBASH; then
39627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39628$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39629      fi
39630      # Try to locate tool using the code snippet
39631      for ac_prog in strip
39632do
39633  # Extract the first word of "$ac_prog", so it can be a program name with args.
39634set dummy $ac_prog; ac_word=$2
39635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39636$as_echo_n "checking for $ac_word... " >&6; }
39637if ${ac_cv_path_STRIP+:} false; then :
39638  $as_echo_n "(cached) " >&6
39639else
39640  case $STRIP in
39641  [\\/]* | ?:[\\/]*)
39642  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39643  ;;
39644  *)
39645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39646for as_dir in $PATH
39647do
39648  IFS=$as_save_IFS
39649  test -z "$as_dir" && as_dir=.
39650    for ac_exec_ext in '' $ac_executable_extensions; do
39651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39652    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39654    break 2
39655  fi
39656done
39657  done
39658IFS=$as_save_IFS
39659
39660  ;;
39661esac
39662fi
39663STRIP=$ac_cv_path_STRIP
39664if test -n "$STRIP"; then
39665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39666$as_echo "$STRIP" >&6; }
39667else
39668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39669$as_echo "no" >&6; }
39670fi
39671
39672
39673  test -n "$STRIP" && break
39674done
39675
39676    else
39677      # If it succeeded, then it was overridden by the user. We will use it
39678      # for the tool.
39679
39680      # First remove it from the list of overridden variables, so we can test
39681      # for unknown variables in the end.
39682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39683
39684      # Check if we try to supply an empty value
39685      if test "x$STRIP" = x; then
39686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39687$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39689$as_echo_n "checking for STRIP... " >&6; }
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39691$as_echo "disabled" >&6; }
39692      else
39693        # Check if the provided tool contains a complete path.
39694        tool_specified="$STRIP"
39695        tool_basename="${tool_specified##*/}"
39696        if test "x$tool_basename" = "x$tool_specified"; then
39697          # A command without a complete path is provided, search $PATH.
39698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39699$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39700          # Extract the first word of "$tool_basename", so it can be a program name with args.
39701set dummy $tool_basename; ac_word=$2
39702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39703$as_echo_n "checking for $ac_word... " >&6; }
39704if ${ac_cv_path_STRIP+:} false; then :
39705  $as_echo_n "(cached) " >&6
39706else
39707  case $STRIP in
39708  [\\/]* | ?:[\\/]*)
39709  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39710  ;;
39711  *)
39712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39713for as_dir in $PATH
39714do
39715  IFS=$as_save_IFS
39716  test -z "$as_dir" && as_dir=.
39717    for ac_exec_ext in '' $ac_executable_extensions; do
39718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39719    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39721    break 2
39722  fi
39723done
39724  done
39725IFS=$as_save_IFS
39726
39727  ;;
39728esac
39729fi
39730STRIP=$ac_cv_path_STRIP
39731if test -n "$STRIP"; then
39732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39733$as_echo "$STRIP" >&6; }
39734else
39735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39736$as_echo "no" >&6; }
39737fi
39738
39739
39740          if test "x$STRIP" = x; then
39741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39742          fi
39743        else
39744          # Otherwise we believe it is a complete path. Use it as it is.
39745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39746$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39748$as_echo_n "checking for STRIP... " >&6; }
39749          if test ! -x "$tool_specified"; then
39750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39751$as_echo "not found" >&6; }
39752            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39753          fi
39754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39755$as_echo "$tool_specified" >&6; }
39756        fi
39757      fi
39758    fi
39759
39760  fi
39761
39762
39763
39764  # Only process if variable expands to non-empty
39765
39766  if test "x$STRIP" != x; then
39767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39768
39769  # First separate the path from the arguments. This will split at the first
39770  # space.
39771  complete="$STRIP"
39772  path="${complete%% *}"
39773  tmp="$complete EOL"
39774  arguments="${tmp#* }"
39775
39776  # Input might be given as Windows format, start by converting to
39777  # unix format.
39778  new_path=`$CYGPATH -u "$path"`
39779
39780  # Now try to locate executable using which
39781  new_path=`$WHICH "$new_path" 2> /dev/null`
39782  # bat and cmd files are not always considered executable in cygwin causing which
39783  # to not find them
39784  if test "x$new_path" = x \
39785      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39786      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39787    new_path=`$CYGPATH -u "$path"`
39788  fi
39789  if test "x$new_path" = x; then
39790    # Oops. Which didn't find the executable.
39791    # The splitting of arguments from the executable at a space might have been incorrect,
39792    # since paths with space are more likely in Windows. Give it another try with the whole
39793    # argument.
39794    path="$complete"
39795    arguments="EOL"
39796    new_path=`$CYGPATH -u "$path"`
39797    new_path=`$WHICH "$new_path" 2> /dev/null`
39798    # bat and cmd files are not always considered executable in cygwin causing which
39799    # to not find them
39800    if test "x$new_path" = x \
39801        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39802        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39803      new_path=`$CYGPATH -u "$path"`
39804    fi
39805    if test "x$new_path" = x; then
39806      # It's still not found. Now this is an unrecoverable error.
39807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39808$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39809      has_space=`$ECHO "$complete" | $GREP " "`
39810      if test "x$has_space" != x; then
39811        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39812$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39813      fi
39814      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39815    fi
39816  fi
39817
39818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39821  # "foo.exe" is OK but "foo" is an error.
39822  #
39823  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39824  # It is also a way to make sure we got the proper file name for the real test later on.
39825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39826  if test "x$test_shortpath" = x; then
39827    # Short path failed, file does not exist as specified.
39828    # Try adding .exe or .cmd
39829    if test -f "${new_path}.exe"; then
39830      input_to_shortpath="${new_path}.exe"
39831    elif test -f "${new_path}.cmd"; then
39832      input_to_shortpath="${new_path}.cmd"
39833    else
39834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39835$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39836      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39837$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39838      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39839    fi
39840  else
39841    input_to_shortpath="$new_path"
39842  fi
39843
39844  # Call helper function which possibly converts this using DOS-style short mode.
39845  # If so, the updated path is stored in $new_path.
39846  new_path="$input_to_shortpath"
39847
39848  input_path="$input_to_shortpath"
39849  # Check if we need to convert this using DOS-style short mode. If the path
39850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39851  # take no chances and rewrite it.
39852  # Note: m4 eats our [], so we need to use [ and ] instead.
39853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39854  if test "x$has_forbidden_chars" != x; then
39855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39859      # Going to short mode and back again did indeed matter. Since short mode is
39860      # case insensitive, let's make it lowercase to improve readability.
39861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39862      # Now convert it back to Unix-style (cygpath)
39863      input_path=`$CYGPATH -u "$shortmode_path"`
39864      new_path="$input_path"
39865    fi
39866  fi
39867
39868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39869  if test "x$test_cygdrive_prefix" = x; then
39870    # As a simple fix, exclude /usr/bin since it's not a real path.
39871    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39873      # a path prefixed by /cygdrive for fixpath to work.
39874      new_path="$CYGWIN_ROOT_PATH$input_path"
39875    fi
39876  fi
39877
39878  # remove trailing .exe if any
39879  new_path="${new_path/%.exe/}"
39880
39881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39882
39883  # First separate the path from the arguments. This will split at the first
39884  # space.
39885  complete="$STRIP"
39886  path="${complete%% *}"
39887  tmp="$complete EOL"
39888  arguments="${tmp#* }"
39889
39890  # Input might be given as Windows format, start by converting to
39891  # unix format.
39892  new_path="$path"
39893
39894  windows_path="$new_path"
39895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39896    unix_path=`$CYGPATH -u "$windows_path"`
39897    new_path="$unix_path"
39898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39900    new_path="$unix_path"
39901  fi
39902
39903
39904  # Now try to locate executable using which
39905  new_path=`$WHICH "$new_path" 2> /dev/null`
39906
39907  if test "x$new_path" = x; then
39908    # Oops. Which didn't find the executable.
39909    # The splitting of arguments from the executable at a space might have been incorrect,
39910    # since paths with space are more likely in Windows. Give it another try with the whole
39911    # argument.
39912    path="$complete"
39913    arguments="EOL"
39914    new_path="$path"
39915
39916  windows_path="$new_path"
39917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39918    unix_path=`$CYGPATH -u "$windows_path"`
39919    new_path="$unix_path"
39920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39922    new_path="$unix_path"
39923  fi
39924
39925
39926    new_path=`$WHICH "$new_path" 2> /dev/null`
39927    # bat and cmd files are not always considered executable in MSYS causing which
39928    # to not find them
39929    if test "x$new_path" = x \
39930        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39931        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39932      new_path="$path"
39933
39934  windows_path="$new_path"
39935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39936    unix_path=`$CYGPATH -u "$windows_path"`
39937    new_path="$unix_path"
39938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39940    new_path="$unix_path"
39941  fi
39942
39943    fi
39944
39945    if test "x$new_path" = x; then
39946      # It's still not found. Now this is an unrecoverable error.
39947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39948$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39949      has_space=`$ECHO "$complete" | $GREP " "`
39950      if test "x$has_space" != x; then
39951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39953      fi
39954      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39955    fi
39956  fi
39957
39958  # Now new_path has a complete unix path to the binary
39959  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39960    # Keep paths in /bin as-is, but remove trailing .exe if any
39961    new_path="${new_path/%.exe/}"
39962    # Do not save /bin paths to all_fixpath_prefixes!
39963  else
39964    # Not in mixed or Windows style, start by that.
39965    new_path=`cmd //c echo $new_path`
39966
39967  input_path="$new_path"
39968  # Check if we need to convert this using DOS-style short mode. If the path
39969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39970  # take no chances and rewrite it.
39971  # Note: m4 eats our [], so we need to use [ and ] instead.
39972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39973  if test "x$has_forbidden_chars" != x; then
39974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39975    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39976  fi
39977
39978    # Output is in $new_path
39979
39980  windows_path="$new_path"
39981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39982    unix_path=`$CYGPATH -u "$windows_path"`
39983    new_path="$unix_path"
39984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39986    new_path="$unix_path"
39987  fi
39988
39989    # remove trailing .exe if any
39990    new_path="${new_path/%.exe/}"
39991
39992    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39993    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39994  fi
39995
39996    else
39997      # We're on a unix platform. Hooray! :)
39998      # First separate the path from the arguments. This will split at the first
39999      # space.
40000      complete="$STRIP"
40001      path="${complete%% *}"
40002      tmp="$complete EOL"
40003      arguments="${tmp#* }"
40004
40005      # Cannot rely on the command "which" here since it doesn't always work.
40006      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40007      if test -z "$is_absolute_path"; then
40008        # Path to executable is not absolute. Find it.
40009        IFS_save="$IFS"
40010        IFS=:
40011        for p in $PATH; do
40012          if test -f "$p/$path" && test -x "$p/$path"; then
40013            new_path="$p/$path"
40014            break
40015          fi
40016        done
40017        IFS="$IFS_save"
40018      else
40019        # This is an absolute path, we can use it without further modifications.
40020        new_path="$path"
40021      fi
40022
40023      if test "x$new_path" = x; then
40024        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40025$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40026        has_space=`$ECHO "$complete" | $GREP " "`
40027        if test "x$has_space" != x; then
40028          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40029$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40030        fi
40031        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40032      fi
40033    fi
40034
40035    # Now join together the path and the arguments once again
40036    if test "x$arguments" != xEOL; then
40037      new_complete="$new_path ${arguments% *}"
40038    else
40039      new_complete="$new_path"
40040    fi
40041
40042    if test "x$complete" != "x$new_complete"; then
40043      STRIP="$new_complete"
40044      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40045$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40046    fi
40047  fi
40048
40049
40050
40051  # Publish this variable in the help.
40052
40053
40054  if [ -z "${NM+x}" ]; then
40055    # The variable is not set by user, try to locate tool using the code snippet
40056    for ac_prog in nm
40057do
40058  # Extract the first word of "$ac_prog", so it can be a program name with args.
40059set dummy $ac_prog; ac_word=$2
40060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40061$as_echo_n "checking for $ac_word... " >&6; }
40062if ${ac_cv_path_NM+:} false; then :
40063  $as_echo_n "(cached) " >&6
40064else
40065  case $NM in
40066  [\\/]* | ?:[\\/]*)
40067  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40068  ;;
40069  *)
40070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40071for as_dir in $PATH
40072do
40073  IFS=$as_save_IFS
40074  test -z "$as_dir" && as_dir=.
40075    for ac_exec_ext in '' $ac_executable_extensions; do
40076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40077    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40079    break 2
40080  fi
40081done
40082  done
40083IFS=$as_save_IFS
40084
40085  ;;
40086esac
40087fi
40088NM=$ac_cv_path_NM
40089if test -n "$NM"; then
40090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40091$as_echo "$NM" >&6; }
40092else
40093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40094$as_echo "no" >&6; }
40095fi
40096
40097
40098  test -n "$NM" && break
40099done
40100
40101  else
40102    # The variable is set, but is it from the command line or the environment?
40103
40104    # Try to remove the string !NM! from our list.
40105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40107      # If it failed, the variable was not from the command line. Ignore it,
40108      # but warn the user (except for BASH, which is always set by the calling BASH).
40109      if test "xNM" != xBASH; then
40110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40111$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40112      fi
40113      # Try to locate tool using the code snippet
40114      for ac_prog in nm
40115do
40116  # Extract the first word of "$ac_prog", so it can be a program name with args.
40117set dummy $ac_prog; ac_word=$2
40118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40119$as_echo_n "checking for $ac_word... " >&6; }
40120if ${ac_cv_path_NM+:} false; then :
40121  $as_echo_n "(cached) " >&6
40122else
40123  case $NM in
40124  [\\/]* | ?:[\\/]*)
40125  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40126  ;;
40127  *)
40128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40129for as_dir in $PATH
40130do
40131  IFS=$as_save_IFS
40132  test -z "$as_dir" && as_dir=.
40133    for ac_exec_ext in '' $ac_executable_extensions; do
40134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40135    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40137    break 2
40138  fi
40139done
40140  done
40141IFS=$as_save_IFS
40142
40143  ;;
40144esac
40145fi
40146NM=$ac_cv_path_NM
40147if test -n "$NM"; then
40148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40149$as_echo "$NM" >&6; }
40150else
40151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40152$as_echo "no" >&6; }
40153fi
40154
40155
40156  test -n "$NM" && break
40157done
40158
40159    else
40160      # If it succeeded, then it was overridden by the user. We will use it
40161      # for the tool.
40162
40163      # First remove it from the list of overridden variables, so we can test
40164      # for unknown variables in the end.
40165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40166
40167      # Check if we try to supply an empty value
40168      if test "x$NM" = x; then
40169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40170$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40172$as_echo_n "checking for NM... " >&6; }
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40174$as_echo "disabled" >&6; }
40175      else
40176        # Check if the provided tool contains a complete path.
40177        tool_specified="$NM"
40178        tool_basename="${tool_specified##*/}"
40179        if test "x$tool_basename" = "x$tool_specified"; then
40180          # A command without a complete path is provided, search $PATH.
40181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40182$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40183          # Extract the first word of "$tool_basename", so it can be a program name with args.
40184set dummy $tool_basename; ac_word=$2
40185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40186$as_echo_n "checking for $ac_word... " >&6; }
40187if ${ac_cv_path_NM+:} false; then :
40188  $as_echo_n "(cached) " >&6
40189else
40190  case $NM in
40191  [\\/]* | ?:[\\/]*)
40192  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40193  ;;
40194  *)
40195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40196for as_dir in $PATH
40197do
40198  IFS=$as_save_IFS
40199  test -z "$as_dir" && as_dir=.
40200    for ac_exec_ext in '' $ac_executable_extensions; do
40201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40202    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40204    break 2
40205  fi
40206done
40207  done
40208IFS=$as_save_IFS
40209
40210  ;;
40211esac
40212fi
40213NM=$ac_cv_path_NM
40214if test -n "$NM"; then
40215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40216$as_echo "$NM" >&6; }
40217else
40218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40219$as_echo "no" >&6; }
40220fi
40221
40222
40223          if test "x$NM" = x; then
40224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40225          fi
40226        else
40227          # Otherwise we believe it is a complete path. Use it as it is.
40228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40229$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40231$as_echo_n "checking for NM... " >&6; }
40232          if test ! -x "$tool_specified"; then
40233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40234$as_echo "not found" >&6; }
40235            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40236          fi
40237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40238$as_echo "$tool_specified" >&6; }
40239        fi
40240      fi
40241    fi
40242
40243  fi
40244
40245
40246
40247  # Only process if variable expands to non-empty
40248
40249  if test "x$NM" != x; then
40250    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40251
40252  # First separate the path from the arguments. This will split at the first
40253  # space.
40254  complete="$NM"
40255  path="${complete%% *}"
40256  tmp="$complete EOL"
40257  arguments="${tmp#* }"
40258
40259  # Input might be given as Windows format, start by converting to
40260  # unix format.
40261  new_path=`$CYGPATH -u "$path"`
40262
40263  # Now try to locate executable using which
40264  new_path=`$WHICH "$new_path" 2> /dev/null`
40265  # bat and cmd files are not always considered executable in cygwin causing which
40266  # to not find them
40267  if test "x$new_path" = x \
40268      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40269      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40270    new_path=`$CYGPATH -u "$path"`
40271  fi
40272  if test "x$new_path" = x; then
40273    # Oops. Which didn't find the executable.
40274    # The splitting of arguments from the executable at a space might have been incorrect,
40275    # since paths with space are more likely in Windows. Give it another try with the whole
40276    # argument.
40277    path="$complete"
40278    arguments="EOL"
40279    new_path=`$CYGPATH -u "$path"`
40280    new_path=`$WHICH "$new_path" 2> /dev/null`
40281    # bat and cmd files are not always considered executable in cygwin causing which
40282    # to not find them
40283    if test "x$new_path" = x \
40284        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40285        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40286      new_path=`$CYGPATH -u "$path"`
40287    fi
40288    if test "x$new_path" = x; then
40289      # It's still not found. Now this is an unrecoverable error.
40290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40291$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40292      has_space=`$ECHO "$complete" | $GREP " "`
40293      if test "x$has_space" != x; then
40294        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40295$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40296      fi
40297      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40298    fi
40299  fi
40300
40301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40304  # "foo.exe" is OK but "foo" is an error.
40305  #
40306  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40307  # It is also a way to make sure we got the proper file name for the real test later on.
40308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40309  if test "x$test_shortpath" = x; then
40310    # Short path failed, file does not exist as specified.
40311    # Try adding .exe or .cmd
40312    if test -f "${new_path}.exe"; then
40313      input_to_shortpath="${new_path}.exe"
40314    elif test -f "${new_path}.cmd"; then
40315      input_to_shortpath="${new_path}.cmd"
40316    else
40317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40318$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40319      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40320$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40321      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40322    fi
40323  else
40324    input_to_shortpath="$new_path"
40325  fi
40326
40327  # Call helper function which possibly converts this using DOS-style short mode.
40328  # If so, the updated path is stored in $new_path.
40329  new_path="$input_to_shortpath"
40330
40331  input_path="$input_to_shortpath"
40332  # Check if we need to convert this using DOS-style short mode. If the path
40333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40334  # take no chances and rewrite it.
40335  # Note: m4 eats our [], so we need to use [ and ] instead.
40336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40337  if test "x$has_forbidden_chars" != x; then
40338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40342      # Going to short mode and back again did indeed matter. Since short mode is
40343      # case insensitive, let's make it lowercase to improve readability.
40344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40345      # Now convert it back to Unix-style (cygpath)
40346      input_path=`$CYGPATH -u "$shortmode_path"`
40347      new_path="$input_path"
40348    fi
40349  fi
40350
40351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40352  if test "x$test_cygdrive_prefix" = x; then
40353    # As a simple fix, exclude /usr/bin since it's not a real path.
40354    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40356      # a path prefixed by /cygdrive for fixpath to work.
40357      new_path="$CYGWIN_ROOT_PATH$input_path"
40358    fi
40359  fi
40360
40361  # remove trailing .exe if any
40362  new_path="${new_path/%.exe/}"
40363
40364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40365
40366  # First separate the path from the arguments. This will split at the first
40367  # space.
40368  complete="$NM"
40369  path="${complete%% *}"
40370  tmp="$complete EOL"
40371  arguments="${tmp#* }"
40372
40373  # Input might be given as Windows format, start by converting to
40374  # unix format.
40375  new_path="$path"
40376
40377  windows_path="$new_path"
40378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40379    unix_path=`$CYGPATH -u "$windows_path"`
40380    new_path="$unix_path"
40381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40383    new_path="$unix_path"
40384  fi
40385
40386
40387  # Now try to locate executable using which
40388  new_path=`$WHICH "$new_path" 2> /dev/null`
40389
40390  if test "x$new_path" = x; then
40391    # Oops. Which didn't find the executable.
40392    # The splitting of arguments from the executable at a space might have been incorrect,
40393    # since paths with space are more likely in Windows. Give it another try with the whole
40394    # argument.
40395    path="$complete"
40396    arguments="EOL"
40397    new_path="$path"
40398
40399  windows_path="$new_path"
40400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40401    unix_path=`$CYGPATH -u "$windows_path"`
40402    new_path="$unix_path"
40403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40405    new_path="$unix_path"
40406  fi
40407
40408
40409    new_path=`$WHICH "$new_path" 2> /dev/null`
40410    # bat and cmd files are not always considered executable in MSYS causing which
40411    # to not find them
40412    if test "x$new_path" = x \
40413        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40414        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40415      new_path="$path"
40416
40417  windows_path="$new_path"
40418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40419    unix_path=`$CYGPATH -u "$windows_path"`
40420    new_path="$unix_path"
40421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40423    new_path="$unix_path"
40424  fi
40425
40426    fi
40427
40428    if test "x$new_path" = x; then
40429      # It's still not found. Now this is an unrecoverable error.
40430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40431$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40432      has_space=`$ECHO "$complete" | $GREP " "`
40433      if test "x$has_space" != x; then
40434        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40435$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40436      fi
40437      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40438    fi
40439  fi
40440
40441  # Now new_path has a complete unix path to the binary
40442  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40443    # Keep paths in /bin as-is, but remove trailing .exe if any
40444    new_path="${new_path/%.exe/}"
40445    # Do not save /bin paths to all_fixpath_prefixes!
40446  else
40447    # Not in mixed or Windows style, start by that.
40448    new_path=`cmd //c echo $new_path`
40449
40450  input_path="$new_path"
40451  # Check if we need to convert this using DOS-style short mode. If the path
40452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40453  # take no chances and rewrite it.
40454  # Note: m4 eats our [], so we need to use [ and ] instead.
40455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40456  if test "x$has_forbidden_chars" != x; then
40457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40459  fi
40460
40461    # Output is in $new_path
40462
40463  windows_path="$new_path"
40464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40465    unix_path=`$CYGPATH -u "$windows_path"`
40466    new_path="$unix_path"
40467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40469    new_path="$unix_path"
40470  fi
40471
40472    # remove trailing .exe if any
40473    new_path="${new_path/%.exe/}"
40474
40475    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40476    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40477  fi
40478
40479    else
40480      # We're on a unix platform. Hooray! :)
40481      # First separate the path from the arguments. This will split at the first
40482      # space.
40483      complete="$NM"
40484      path="${complete%% *}"
40485      tmp="$complete EOL"
40486      arguments="${tmp#* }"
40487
40488      # Cannot rely on the command "which" here since it doesn't always work.
40489      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40490      if test -z "$is_absolute_path"; then
40491        # Path to executable is not absolute. Find it.
40492        IFS_save="$IFS"
40493        IFS=:
40494        for p in $PATH; do
40495          if test -f "$p/$path" && test -x "$p/$path"; then
40496            new_path="$p/$path"
40497            break
40498          fi
40499        done
40500        IFS="$IFS_save"
40501      else
40502        # This is an absolute path, we can use it without further modifications.
40503        new_path="$path"
40504      fi
40505
40506      if test "x$new_path" = x; then
40507        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40508$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40509        has_space=`$ECHO "$complete" | $GREP " "`
40510        if test "x$has_space" != x; then
40511          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40512$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40513        fi
40514        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40515      fi
40516    fi
40517
40518    # Now join together the path and the arguments once again
40519    if test "x$arguments" != xEOL; then
40520      new_complete="$new_path ${arguments% *}"
40521    else
40522      new_complete="$new_path"
40523    fi
40524
40525    if test "x$complete" != "x$new_complete"; then
40526      NM="$new_complete"
40527      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40528$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40529    fi
40530  fi
40531
40532
40533
40534  # Publish this variable in the help.
40535
40536
40537  if [ -z "${GNM+x}" ]; then
40538    # The variable is not set by user, try to locate tool using the code snippet
40539    for ac_prog in gnm
40540do
40541  # Extract the first word of "$ac_prog", so it can be a program name with args.
40542set dummy $ac_prog; ac_word=$2
40543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40544$as_echo_n "checking for $ac_word... " >&6; }
40545if ${ac_cv_path_GNM+:} false; then :
40546  $as_echo_n "(cached) " >&6
40547else
40548  case $GNM in
40549  [\\/]* | ?:[\\/]*)
40550  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40551  ;;
40552  *)
40553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40554for as_dir in $PATH
40555do
40556  IFS=$as_save_IFS
40557  test -z "$as_dir" && as_dir=.
40558    for ac_exec_ext in '' $ac_executable_extensions; do
40559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40560    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40562    break 2
40563  fi
40564done
40565  done
40566IFS=$as_save_IFS
40567
40568  ;;
40569esac
40570fi
40571GNM=$ac_cv_path_GNM
40572if test -n "$GNM"; then
40573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40574$as_echo "$GNM" >&6; }
40575else
40576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40577$as_echo "no" >&6; }
40578fi
40579
40580
40581  test -n "$GNM" && break
40582done
40583
40584  else
40585    # The variable is set, but is it from the command line or the environment?
40586
40587    # Try to remove the string !GNM! from our list.
40588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40590      # If it failed, the variable was not from the command line. Ignore it,
40591      # but warn the user (except for BASH, which is always set by the calling BASH).
40592      if test "xGNM" != xBASH; then
40593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40594$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40595      fi
40596      # Try to locate tool using the code snippet
40597      for ac_prog in gnm
40598do
40599  # Extract the first word of "$ac_prog", so it can be a program name with args.
40600set dummy $ac_prog; ac_word=$2
40601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40602$as_echo_n "checking for $ac_word... " >&6; }
40603if ${ac_cv_path_GNM+:} false; then :
40604  $as_echo_n "(cached) " >&6
40605else
40606  case $GNM in
40607  [\\/]* | ?:[\\/]*)
40608  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40609  ;;
40610  *)
40611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40612for as_dir in $PATH
40613do
40614  IFS=$as_save_IFS
40615  test -z "$as_dir" && as_dir=.
40616    for ac_exec_ext in '' $ac_executable_extensions; do
40617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40618    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40620    break 2
40621  fi
40622done
40623  done
40624IFS=$as_save_IFS
40625
40626  ;;
40627esac
40628fi
40629GNM=$ac_cv_path_GNM
40630if test -n "$GNM"; then
40631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40632$as_echo "$GNM" >&6; }
40633else
40634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40635$as_echo "no" >&6; }
40636fi
40637
40638
40639  test -n "$GNM" && break
40640done
40641
40642    else
40643      # If it succeeded, then it was overridden by the user. We will use it
40644      # for the tool.
40645
40646      # First remove it from the list of overridden variables, so we can test
40647      # for unknown variables in the end.
40648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40649
40650      # Check if we try to supply an empty value
40651      if test "x$GNM" = x; then
40652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40653$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40655$as_echo_n "checking for GNM... " >&6; }
40656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40657$as_echo "disabled" >&6; }
40658      else
40659        # Check if the provided tool contains a complete path.
40660        tool_specified="$GNM"
40661        tool_basename="${tool_specified##*/}"
40662        if test "x$tool_basename" = "x$tool_specified"; then
40663          # A command without a complete path is provided, search $PATH.
40664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40665$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40666          # Extract the first word of "$tool_basename", so it can be a program name with args.
40667set dummy $tool_basename; ac_word=$2
40668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40669$as_echo_n "checking for $ac_word... " >&6; }
40670if ${ac_cv_path_GNM+:} false; then :
40671  $as_echo_n "(cached) " >&6
40672else
40673  case $GNM in
40674  [\\/]* | ?:[\\/]*)
40675  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40676  ;;
40677  *)
40678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40679for as_dir in $PATH
40680do
40681  IFS=$as_save_IFS
40682  test -z "$as_dir" && as_dir=.
40683    for ac_exec_ext in '' $ac_executable_extensions; do
40684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40685    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40687    break 2
40688  fi
40689done
40690  done
40691IFS=$as_save_IFS
40692
40693  ;;
40694esac
40695fi
40696GNM=$ac_cv_path_GNM
40697if test -n "$GNM"; then
40698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40699$as_echo "$GNM" >&6; }
40700else
40701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40702$as_echo "no" >&6; }
40703fi
40704
40705
40706          if test "x$GNM" = x; then
40707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40708          fi
40709        else
40710          # Otherwise we believe it is a complete path. Use it as it is.
40711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40712$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40714$as_echo_n "checking for GNM... " >&6; }
40715          if test ! -x "$tool_specified"; then
40716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40717$as_echo "not found" >&6; }
40718            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40719          fi
40720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40721$as_echo "$tool_specified" >&6; }
40722        fi
40723      fi
40724    fi
40725
40726  fi
40727
40728
40729
40730  # Only process if variable expands to non-empty
40731
40732  if test "x$GNM" != x; then
40733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40734
40735  # First separate the path from the arguments. This will split at the first
40736  # space.
40737  complete="$GNM"
40738  path="${complete%% *}"
40739  tmp="$complete EOL"
40740  arguments="${tmp#* }"
40741
40742  # Input might be given as Windows format, start by converting to
40743  # unix format.
40744  new_path=`$CYGPATH -u "$path"`
40745
40746  # Now try to locate executable using which
40747  new_path=`$WHICH "$new_path" 2> /dev/null`
40748  # bat and cmd files are not always considered executable in cygwin causing which
40749  # to not find them
40750  if test "x$new_path" = x \
40751      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40752      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40753    new_path=`$CYGPATH -u "$path"`
40754  fi
40755  if test "x$new_path" = x; then
40756    # Oops. Which didn't find the executable.
40757    # The splitting of arguments from the executable at a space might have been incorrect,
40758    # since paths with space are more likely in Windows. Give it another try with the whole
40759    # argument.
40760    path="$complete"
40761    arguments="EOL"
40762    new_path=`$CYGPATH -u "$path"`
40763    new_path=`$WHICH "$new_path" 2> /dev/null`
40764    # bat and cmd files are not always considered executable in cygwin causing which
40765    # to not find them
40766    if test "x$new_path" = x \
40767        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40768        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40769      new_path=`$CYGPATH -u "$path"`
40770    fi
40771    if test "x$new_path" = x; then
40772      # It's still not found. Now this is an unrecoverable error.
40773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40774$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40775      has_space=`$ECHO "$complete" | $GREP " "`
40776      if test "x$has_space" != x; then
40777        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40778$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40779      fi
40780      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40781    fi
40782  fi
40783
40784  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40785  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40786  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40787  # "foo.exe" is OK but "foo" is an error.
40788  #
40789  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40790  # It is also a way to make sure we got the proper file name for the real test later on.
40791  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40792  if test "x$test_shortpath" = x; then
40793    # Short path failed, file does not exist as specified.
40794    # Try adding .exe or .cmd
40795    if test -f "${new_path}.exe"; then
40796      input_to_shortpath="${new_path}.exe"
40797    elif test -f "${new_path}.cmd"; then
40798      input_to_shortpath="${new_path}.cmd"
40799    else
40800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40801$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40802      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40803$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40804      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40805    fi
40806  else
40807    input_to_shortpath="$new_path"
40808  fi
40809
40810  # Call helper function which possibly converts this using DOS-style short mode.
40811  # If so, the updated path is stored in $new_path.
40812  new_path="$input_to_shortpath"
40813
40814  input_path="$input_to_shortpath"
40815  # Check if we need to convert this using DOS-style short mode. If the path
40816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40817  # take no chances and rewrite it.
40818  # Note: m4 eats our [], so we need to use [ and ] instead.
40819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40820  if test "x$has_forbidden_chars" != x; then
40821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40825      # Going to short mode and back again did indeed matter. Since short mode is
40826      # case insensitive, let's make it lowercase to improve readability.
40827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40828      # Now convert it back to Unix-style (cygpath)
40829      input_path=`$CYGPATH -u "$shortmode_path"`
40830      new_path="$input_path"
40831    fi
40832  fi
40833
40834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40835  if test "x$test_cygdrive_prefix" = x; then
40836    # As a simple fix, exclude /usr/bin since it's not a real path.
40837    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40839      # a path prefixed by /cygdrive for fixpath to work.
40840      new_path="$CYGWIN_ROOT_PATH$input_path"
40841    fi
40842  fi
40843
40844  # remove trailing .exe if any
40845  new_path="${new_path/%.exe/}"
40846
40847    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40848
40849  # First separate the path from the arguments. This will split at the first
40850  # space.
40851  complete="$GNM"
40852  path="${complete%% *}"
40853  tmp="$complete EOL"
40854  arguments="${tmp#* }"
40855
40856  # Input might be given as Windows format, start by converting to
40857  # unix format.
40858  new_path="$path"
40859
40860  windows_path="$new_path"
40861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40862    unix_path=`$CYGPATH -u "$windows_path"`
40863    new_path="$unix_path"
40864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40866    new_path="$unix_path"
40867  fi
40868
40869
40870  # Now try to locate executable using which
40871  new_path=`$WHICH "$new_path" 2> /dev/null`
40872
40873  if test "x$new_path" = x; then
40874    # Oops. Which didn't find the executable.
40875    # The splitting of arguments from the executable at a space might have been incorrect,
40876    # since paths with space are more likely in Windows. Give it another try with the whole
40877    # argument.
40878    path="$complete"
40879    arguments="EOL"
40880    new_path="$path"
40881
40882  windows_path="$new_path"
40883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40884    unix_path=`$CYGPATH -u "$windows_path"`
40885    new_path="$unix_path"
40886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40888    new_path="$unix_path"
40889  fi
40890
40891
40892    new_path=`$WHICH "$new_path" 2> /dev/null`
40893    # bat and cmd files are not always considered executable in MSYS causing which
40894    # to not find them
40895    if test "x$new_path" = x \
40896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40898      new_path="$path"
40899
40900  windows_path="$new_path"
40901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40902    unix_path=`$CYGPATH -u "$windows_path"`
40903    new_path="$unix_path"
40904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40906    new_path="$unix_path"
40907  fi
40908
40909    fi
40910
40911    if test "x$new_path" = x; then
40912      # It's still not found. Now this is an unrecoverable error.
40913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40914$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40915      has_space=`$ECHO "$complete" | $GREP " "`
40916      if test "x$has_space" != x; then
40917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40919      fi
40920      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40921    fi
40922  fi
40923
40924  # Now new_path has a complete unix path to the binary
40925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40926    # Keep paths in /bin as-is, but remove trailing .exe if any
40927    new_path="${new_path/%.exe/}"
40928    # Do not save /bin paths to all_fixpath_prefixes!
40929  else
40930    # Not in mixed or Windows style, start by that.
40931    new_path=`cmd //c echo $new_path`
40932
40933  input_path="$new_path"
40934  # Check if we need to convert this using DOS-style short mode. If the path
40935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40936  # take no chances and rewrite it.
40937  # Note: m4 eats our [], so we need to use [ and ] instead.
40938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40939  if test "x$has_forbidden_chars" != x; then
40940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40942  fi
40943
40944    # Output is in $new_path
40945
40946  windows_path="$new_path"
40947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40948    unix_path=`$CYGPATH -u "$windows_path"`
40949    new_path="$unix_path"
40950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40952    new_path="$unix_path"
40953  fi
40954
40955    # remove trailing .exe if any
40956    new_path="${new_path/%.exe/}"
40957
40958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40960  fi
40961
40962    else
40963      # We're on a unix platform. Hooray! :)
40964      # First separate the path from the arguments. This will split at the first
40965      # space.
40966      complete="$GNM"
40967      path="${complete%% *}"
40968      tmp="$complete EOL"
40969      arguments="${tmp#* }"
40970
40971      # Cannot rely on the command "which" here since it doesn't always work.
40972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40973      if test -z "$is_absolute_path"; then
40974        # Path to executable is not absolute. Find it.
40975        IFS_save="$IFS"
40976        IFS=:
40977        for p in $PATH; do
40978          if test -f "$p/$path" && test -x "$p/$path"; then
40979            new_path="$p/$path"
40980            break
40981          fi
40982        done
40983        IFS="$IFS_save"
40984      else
40985        # This is an absolute path, we can use it without further modifications.
40986        new_path="$path"
40987      fi
40988
40989      if test "x$new_path" = x; then
40990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40991$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40992        has_space=`$ECHO "$complete" | $GREP " "`
40993        if test "x$has_space" != x; then
40994          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40995$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40996        fi
40997        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40998      fi
40999    fi
41000
41001    # Now join together the path and the arguments once again
41002    if test "x$arguments" != xEOL; then
41003      new_complete="$new_path ${arguments% *}"
41004    else
41005      new_complete="$new_path"
41006    fi
41007
41008    if test "x$complete" != "x$new_complete"; then
41009      GNM="$new_complete"
41010      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41011$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41012    fi
41013  fi
41014
41015  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41016    # FIXME: we should unify this with the solaris case above.
41017
41018
41019  # Publish this variable in the help.
41020
41021
41022  if [ -z "${STRIP+x}" ]; then
41023    # The variable is not set by user, try to locate tool using the code snippet
41024    if test -n "$ac_tool_prefix"; then
41025  for ac_prog in strip
41026  do
41027    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41028set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41030$as_echo_n "checking for $ac_word... " >&6; }
41031if ${ac_cv_prog_STRIP+:} false; then :
41032  $as_echo_n "(cached) " >&6
41033else
41034  if test -n "$STRIP"; then
41035  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41036else
41037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41038for as_dir in $PATH
41039do
41040  IFS=$as_save_IFS
41041  test -z "$as_dir" && as_dir=.
41042    for ac_exec_ext in '' $ac_executable_extensions; do
41043  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41044    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41045    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41046    break 2
41047  fi
41048done
41049  done
41050IFS=$as_save_IFS
41051
41052fi
41053fi
41054STRIP=$ac_cv_prog_STRIP
41055if test -n "$STRIP"; then
41056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41057$as_echo "$STRIP" >&6; }
41058else
41059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41060$as_echo "no" >&6; }
41061fi
41062
41063
41064    test -n "$STRIP" && break
41065  done
41066fi
41067if test -z "$STRIP"; then
41068  ac_ct_STRIP=$STRIP
41069  for ac_prog in strip
41070do
41071  # Extract the first word of "$ac_prog", so it can be a program name with args.
41072set dummy $ac_prog; ac_word=$2
41073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41074$as_echo_n "checking for $ac_word... " >&6; }
41075if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41076  $as_echo_n "(cached) " >&6
41077else
41078  if test -n "$ac_ct_STRIP"; then
41079  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41080else
41081as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41082for as_dir in $PATH
41083do
41084  IFS=$as_save_IFS
41085  test -z "$as_dir" && as_dir=.
41086    for ac_exec_ext in '' $ac_executable_extensions; do
41087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41088    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41090    break 2
41091  fi
41092done
41093  done
41094IFS=$as_save_IFS
41095
41096fi
41097fi
41098ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41099if test -n "$ac_ct_STRIP"; then
41100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41101$as_echo "$ac_ct_STRIP" >&6; }
41102else
41103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41104$as_echo "no" >&6; }
41105fi
41106
41107
41108  test -n "$ac_ct_STRIP" && break
41109done
41110
41111  if test "x$ac_ct_STRIP" = x; then
41112    STRIP=""
41113  else
41114    case $cross_compiling:$ac_tool_warned in
41115yes:)
41116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41118ac_tool_warned=yes ;;
41119esac
41120    STRIP=$ac_ct_STRIP
41121  fi
41122fi
41123
41124  else
41125    # The variable is set, but is it from the command line or the environment?
41126
41127    # Try to remove the string !STRIP! from our list.
41128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41130      # If it failed, the variable was not from the command line. Ignore it,
41131      # but warn the user (except for BASH, which is always set by the calling BASH).
41132      if test "xSTRIP" != xBASH; then
41133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41134$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41135      fi
41136      # Try to locate tool using the code snippet
41137      if test -n "$ac_tool_prefix"; then
41138  for ac_prog in strip
41139  do
41140    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41143$as_echo_n "checking for $ac_word... " >&6; }
41144if ${ac_cv_prog_STRIP+:} false; then :
41145  $as_echo_n "(cached) " >&6
41146else
41147  if test -n "$STRIP"; then
41148  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41149else
41150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41151for as_dir in $PATH
41152do
41153  IFS=$as_save_IFS
41154  test -z "$as_dir" && as_dir=.
41155    for ac_exec_ext in '' $ac_executable_extensions; do
41156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41157    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41159    break 2
41160  fi
41161done
41162  done
41163IFS=$as_save_IFS
41164
41165fi
41166fi
41167STRIP=$ac_cv_prog_STRIP
41168if test -n "$STRIP"; then
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41170$as_echo "$STRIP" >&6; }
41171else
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41173$as_echo "no" >&6; }
41174fi
41175
41176
41177    test -n "$STRIP" && break
41178  done
41179fi
41180if test -z "$STRIP"; then
41181  ac_ct_STRIP=$STRIP
41182  for ac_prog in strip
41183do
41184  # Extract the first word of "$ac_prog", so it can be a program name with args.
41185set dummy $ac_prog; ac_word=$2
41186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41187$as_echo_n "checking for $ac_word... " >&6; }
41188if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41189  $as_echo_n "(cached) " >&6
41190else
41191  if test -n "$ac_ct_STRIP"; then
41192  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41193else
41194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41195for as_dir in $PATH
41196do
41197  IFS=$as_save_IFS
41198  test -z "$as_dir" && as_dir=.
41199    for ac_exec_ext in '' $ac_executable_extensions; do
41200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41201    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41203    break 2
41204  fi
41205done
41206  done
41207IFS=$as_save_IFS
41208
41209fi
41210fi
41211ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41212if test -n "$ac_ct_STRIP"; then
41213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41214$as_echo "$ac_ct_STRIP" >&6; }
41215else
41216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41217$as_echo "no" >&6; }
41218fi
41219
41220
41221  test -n "$ac_ct_STRIP" && break
41222done
41223
41224  if test "x$ac_ct_STRIP" = x; then
41225    STRIP=""
41226  else
41227    case $cross_compiling:$ac_tool_warned in
41228yes:)
41229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41231ac_tool_warned=yes ;;
41232esac
41233    STRIP=$ac_ct_STRIP
41234  fi
41235fi
41236
41237    else
41238      # If it succeeded, then it was overridden by the user. We will use it
41239      # for the tool.
41240
41241      # First remove it from the list of overridden variables, so we can test
41242      # for unknown variables in the end.
41243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41244
41245      # Check if we try to supply an empty value
41246      if test "x$STRIP" = x; then
41247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41248$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41250$as_echo_n "checking for STRIP... " >&6; }
41251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41252$as_echo "disabled" >&6; }
41253      else
41254        # Check if the provided tool contains a complete path.
41255        tool_specified="$STRIP"
41256        tool_basename="${tool_specified##*/}"
41257        if test "x$tool_basename" = "x$tool_specified"; then
41258          # A command without a complete path is provided, search $PATH.
41259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41260$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41261          # Extract the first word of "$tool_basename", so it can be a program name with args.
41262set dummy $tool_basename; ac_word=$2
41263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41264$as_echo_n "checking for $ac_word... " >&6; }
41265if ${ac_cv_path_STRIP+:} false; then :
41266  $as_echo_n "(cached) " >&6
41267else
41268  case $STRIP in
41269  [\\/]* | ?:[\\/]*)
41270  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41271  ;;
41272  *)
41273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41274for as_dir in $PATH
41275do
41276  IFS=$as_save_IFS
41277  test -z "$as_dir" && as_dir=.
41278    for ac_exec_ext in '' $ac_executable_extensions; do
41279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41280    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41282    break 2
41283  fi
41284done
41285  done
41286IFS=$as_save_IFS
41287
41288  ;;
41289esac
41290fi
41291STRIP=$ac_cv_path_STRIP
41292if test -n "$STRIP"; then
41293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41294$as_echo "$STRIP" >&6; }
41295else
41296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41297$as_echo "no" >&6; }
41298fi
41299
41300
41301          if test "x$STRIP" = x; then
41302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41303          fi
41304        else
41305          # Otherwise we believe it is a complete path. Use it as it is.
41306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41307$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41309$as_echo_n "checking for STRIP... " >&6; }
41310          if test ! -x "$tool_specified"; then
41311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41312$as_echo "not found" >&6; }
41313            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41314          fi
41315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41316$as_echo "$tool_specified" >&6; }
41317        fi
41318      fi
41319    fi
41320
41321  fi
41322
41323
41324
41325  # Only process if variable expands to non-empty
41326
41327  if test "x$STRIP" != x; then
41328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41329
41330  # First separate the path from the arguments. This will split at the first
41331  # space.
41332  complete="$STRIP"
41333  path="${complete%% *}"
41334  tmp="$complete EOL"
41335  arguments="${tmp#* }"
41336
41337  # Input might be given as Windows format, start by converting to
41338  # unix format.
41339  new_path=`$CYGPATH -u "$path"`
41340
41341  # Now try to locate executable using which
41342  new_path=`$WHICH "$new_path" 2> /dev/null`
41343  # bat and cmd files are not always considered executable in cygwin causing which
41344  # to not find them
41345  if test "x$new_path" = x \
41346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41348    new_path=`$CYGPATH -u "$path"`
41349  fi
41350  if test "x$new_path" = x; then
41351    # Oops. Which didn't find the executable.
41352    # The splitting of arguments from the executable at a space might have been incorrect,
41353    # since paths with space are more likely in Windows. Give it another try with the whole
41354    # argument.
41355    path="$complete"
41356    arguments="EOL"
41357    new_path=`$CYGPATH -u "$path"`
41358    new_path=`$WHICH "$new_path" 2> /dev/null`
41359    # bat and cmd files are not always considered executable in cygwin causing which
41360    # to not find them
41361    if test "x$new_path" = x \
41362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41364      new_path=`$CYGPATH -u "$path"`
41365    fi
41366    if test "x$new_path" = x; then
41367      # It's still not found. Now this is an unrecoverable error.
41368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41369$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41370      has_space=`$ECHO "$complete" | $GREP " "`
41371      if test "x$has_space" != x; then
41372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41374      fi
41375      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41376    fi
41377  fi
41378
41379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41382  # "foo.exe" is OK but "foo" is an error.
41383  #
41384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41385  # It is also a way to make sure we got the proper file name for the real test later on.
41386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41387  if test "x$test_shortpath" = x; then
41388    # Short path failed, file does not exist as specified.
41389    # Try adding .exe or .cmd
41390    if test -f "${new_path}.exe"; then
41391      input_to_shortpath="${new_path}.exe"
41392    elif test -f "${new_path}.cmd"; then
41393      input_to_shortpath="${new_path}.cmd"
41394    else
41395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41396$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41399      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41400    fi
41401  else
41402    input_to_shortpath="$new_path"
41403  fi
41404
41405  # Call helper function which possibly converts this using DOS-style short mode.
41406  # If so, the updated path is stored in $new_path.
41407  new_path="$input_to_shortpath"
41408
41409  input_path="$input_to_shortpath"
41410  # Check if we need to convert this using DOS-style short mode. If the path
41411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41412  # take no chances and rewrite it.
41413  # Note: m4 eats our [], so we need to use [ and ] instead.
41414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41415  if test "x$has_forbidden_chars" != x; then
41416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41420      # Going to short mode and back again did indeed matter. Since short mode is
41421      # case insensitive, let's make it lowercase to improve readability.
41422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41423      # Now convert it back to Unix-style (cygpath)
41424      input_path=`$CYGPATH -u "$shortmode_path"`
41425      new_path="$input_path"
41426    fi
41427  fi
41428
41429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41430  if test "x$test_cygdrive_prefix" = x; then
41431    # As a simple fix, exclude /usr/bin since it's not a real path.
41432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41434      # a path prefixed by /cygdrive for fixpath to work.
41435      new_path="$CYGWIN_ROOT_PATH$input_path"
41436    fi
41437  fi
41438
41439  # remove trailing .exe if any
41440  new_path="${new_path/%.exe/}"
41441
41442    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41443
41444  # First separate the path from the arguments. This will split at the first
41445  # space.
41446  complete="$STRIP"
41447  path="${complete%% *}"
41448  tmp="$complete EOL"
41449  arguments="${tmp#* }"
41450
41451  # Input might be given as Windows format, start by converting to
41452  # unix format.
41453  new_path="$path"
41454
41455  windows_path="$new_path"
41456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41457    unix_path=`$CYGPATH -u "$windows_path"`
41458    new_path="$unix_path"
41459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41461    new_path="$unix_path"
41462  fi
41463
41464
41465  # Now try to locate executable using which
41466  new_path=`$WHICH "$new_path" 2> /dev/null`
41467
41468  if test "x$new_path" = x; then
41469    # Oops. Which didn't find the executable.
41470    # The splitting of arguments from the executable at a space might have been incorrect,
41471    # since paths with space are more likely in Windows. Give it another try with the whole
41472    # argument.
41473    path="$complete"
41474    arguments="EOL"
41475    new_path="$path"
41476
41477  windows_path="$new_path"
41478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41479    unix_path=`$CYGPATH -u "$windows_path"`
41480    new_path="$unix_path"
41481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41483    new_path="$unix_path"
41484  fi
41485
41486
41487    new_path=`$WHICH "$new_path" 2> /dev/null`
41488    # bat and cmd files are not always considered executable in MSYS causing which
41489    # to not find them
41490    if test "x$new_path" = x \
41491        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41492        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41493      new_path="$path"
41494
41495  windows_path="$new_path"
41496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41497    unix_path=`$CYGPATH -u "$windows_path"`
41498    new_path="$unix_path"
41499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41501    new_path="$unix_path"
41502  fi
41503
41504    fi
41505
41506    if test "x$new_path" = x; then
41507      # It's still not found. Now this is an unrecoverable error.
41508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41509$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41510      has_space=`$ECHO "$complete" | $GREP " "`
41511      if test "x$has_space" != x; then
41512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41514      fi
41515      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41516    fi
41517  fi
41518
41519  # Now new_path has a complete unix path to the binary
41520  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41521    # Keep paths in /bin as-is, but remove trailing .exe if any
41522    new_path="${new_path/%.exe/}"
41523    # Do not save /bin paths to all_fixpath_prefixes!
41524  else
41525    # Not in mixed or Windows style, start by that.
41526    new_path=`cmd //c echo $new_path`
41527
41528  input_path="$new_path"
41529  # Check if we need to convert this using DOS-style short mode. If the path
41530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41531  # take no chances and rewrite it.
41532  # Note: m4 eats our [], so we need to use [ and ] instead.
41533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41534  if test "x$has_forbidden_chars" != x; then
41535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41537  fi
41538
41539    # Output is in $new_path
41540
41541  windows_path="$new_path"
41542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41543    unix_path=`$CYGPATH -u "$windows_path"`
41544    new_path="$unix_path"
41545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41547    new_path="$unix_path"
41548  fi
41549
41550    # remove trailing .exe if any
41551    new_path="${new_path/%.exe/}"
41552
41553    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41554    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41555  fi
41556
41557    else
41558      # We're on a unix platform. Hooray! :)
41559      # First separate the path from the arguments. This will split at the first
41560      # space.
41561      complete="$STRIP"
41562      path="${complete%% *}"
41563      tmp="$complete EOL"
41564      arguments="${tmp#* }"
41565
41566      # Cannot rely on the command "which" here since it doesn't always work.
41567      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41568      if test -z "$is_absolute_path"; then
41569        # Path to executable is not absolute. Find it.
41570        IFS_save="$IFS"
41571        IFS=:
41572        for p in $PATH; do
41573          if test -f "$p/$path" && test -x "$p/$path"; then
41574            new_path="$p/$path"
41575            break
41576          fi
41577        done
41578        IFS="$IFS_save"
41579      else
41580        # This is an absolute path, we can use it without further modifications.
41581        new_path="$path"
41582      fi
41583
41584      if test "x$new_path" = x; then
41585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41586$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41587        has_space=`$ECHO "$complete" | $GREP " "`
41588        if test "x$has_space" != x; then
41589          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41591        fi
41592        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41593      fi
41594    fi
41595
41596    # Now join together the path and the arguments once again
41597    if test "x$arguments" != xEOL; then
41598      new_complete="$new_path ${arguments% *}"
41599    else
41600      new_complete="$new_path"
41601    fi
41602
41603    if test "x$complete" != "x$new_complete"; then
41604      STRIP="$new_complete"
41605      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41606$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41607    fi
41608  fi
41609
41610    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41611
41612
41613  # Publish this variable in the help.
41614
41615
41616  if [ -z "${NM+x}" ]; then
41617    # The variable is not set by user, try to locate tool using the code snippet
41618    if test -n "$ac_tool_prefix"; then
41619  for ac_prog in nm gcc-nm
41620  do
41621    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41622set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41624$as_echo_n "checking for $ac_word... " >&6; }
41625if ${ac_cv_prog_NM+:} false; then :
41626  $as_echo_n "(cached) " >&6
41627else
41628  if test -n "$NM"; then
41629  ac_cv_prog_NM="$NM" # Let the user override the test.
41630else
41631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41632for as_dir in $PATH
41633do
41634  IFS=$as_save_IFS
41635  test -z "$as_dir" && as_dir=.
41636    for ac_exec_ext in '' $ac_executable_extensions; do
41637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41638    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41640    break 2
41641  fi
41642done
41643  done
41644IFS=$as_save_IFS
41645
41646fi
41647fi
41648NM=$ac_cv_prog_NM
41649if test -n "$NM"; then
41650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41651$as_echo "$NM" >&6; }
41652else
41653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41654$as_echo "no" >&6; }
41655fi
41656
41657
41658    test -n "$NM" && break
41659  done
41660fi
41661if test -z "$NM"; then
41662  ac_ct_NM=$NM
41663  for ac_prog in nm gcc-nm
41664do
41665  # Extract the first word of "$ac_prog", so it can be a program name with args.
41666set dummy $ac_prog; ac_word=$2
41667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41668$as_echo_n "checking for $ac_word... " >&6; }
41669if ${ac_cv_prog_ac_ct_NM+:} false; then :
41670  $as_echo_n "(cached) " >&6
41671else
41672  if test -n "$ac_ct_NM"; then
41673  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41674else
41675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41676for as_dir in $PATH
41677do
41678  IFS=$as_save_IFS
41679  test -z "$as_dir" && as_dir=.
41680    for ac_exec_ext in '' $ac_executable_extensions; do
41681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41682    ac_cv_prog_ac_ct_NM="$ac_prog"
41683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41684    break 2
41685  fi
41686done
41687  done
41688IFS=$as_save_IFS
41689
41690fi
41691fi
41692ac_ct_NM=$ac_cv_prog_ac_ct_NM
41693if test -n "$ac_ct_NM"; then
41694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41695$as_echo "$ac_ct_NM" >&6; }
41696else
41697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41698$as_echo "no" >&6; }
41699fi
41700
41701
41702  test -n "$ac_ct_NM" && break
41703done
41704
41705  if test "x$ac_ct_NM" = x; then
41706    NM=""
41707  else
41708    case $cross_compiling:$ac_tool_warned in
41709yes:)
41710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41712ac_tool_warned=yes ;;
41713esac
41714    NM=$ac_ct_NM
41715  fi
41716fi
41717
41718  else
41719    # The variable is set, but is it from the command line or the environment?
41720
41721    # Try to remove the string !NM! from our list.
41722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41724      # If it failed, the variable was not from the command line. Ignore it,
41725      # but warn the user (except for BASH, which is always set by the calling BASH).
41726      if test "xNM" != xBASH; then
41727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41728$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41729      fi
41730      # Try to locate tool using the code snippet
41731      if test -n "$ac_tool_prefix"; then
41732  for ac_prog in nm gcc-nm
41733  do
41734    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41735set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41737$as_echo_n "checking for $ac_word... " >&6; }
41738if ${ac_cv_prog_NM+:} false; then :
41739  $as_echo_n "(cached) " >&6
41740else
41741  if test -n "$NM"; then
41742  ac_cv_prog_NM="$NM" # Let the user override the test.
41743else
41744as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41745for as_dir in $PATH
41746do
41747  IFS=$as_save_IFS
41748  test -z "$as_dir" && as_dir=.
41749    for ac_exec_ext in '' $ac_executable_extensions; do
41750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41751    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41753    break 2
41754  fi
41755done
41756  done
41757IFS=$as_save_IFS
41758
41759fi
41760fi
41761NM=$ac_cv_prog_NM
41762if test -n "$NM"; then
41763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41764$as_echo "$NM" >&6; }
41765else
41766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41767$as_echo "no" >&6; }
41768fi
41769
41770
41771    test -n "$NM" && break
41772  done
41773fi
41774if test -z "$NM"; then
41775  ac_ct_NM=$NM
41776  for ac_prog in nm gcc-nm
41777do
41778  # Extract the first word of "$ac_prog", so it can be a program name with args.
41779set dummy $ac_prog; ac_word=$2
41780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41781$as_echo_n "checking for $ac_word... " >&6; }
41782if ${ac_cv_prog_ac_ct_NM+:} false; then :
41783  $as_echo_n "(cached) " >&6
41784else
41785  if test -n "$ac_ct_NM"; then
41786  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41787else
41788as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41789for as_dir in $PATH
41790do
41791  IFS=$as_save_IFS
41792  test -z "$as_dir" && as_dir=.
41793    for ac_exec_ext in '' $ac_executable_extensions; do
41794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41795    ac_cv_prog_ac_ct_NM="$ac_prog"
41796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41797    break 2
41798  fi
41799done
41800  done
41801IFS=$as_save_IFS
41802
41803fi
41804fi
41805ac_ct_NM=$ac_cv_prog_ac_ct_NM
41806if test -n "$ac_ct_NM"; then
41807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41808$as_echo "$ac_ct_NM" >&6; }
41809else
41810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41811$as_echo "no" >&6; }
41812fi
41813
41814
41815  test -n "$ac_ct_NM" && break
41816done
41817
41818  if test "x$ac_ct_NM" = x; then
41819    NM=""
41820  else
41821    case $cross_compiling:$ac_tool_warned in
41822yes:)
41823{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41824$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41825ac_tool_warned=yes ;;
41826esac
41827    NM=$ac_ct_NM
41828  fi
41829fi
41830
41831    else
41832      # If it succeeded, then it was overridden by the user. We will use it
41833      # for the tool.
41834
41835      # First remove it from the list of overridden variables, so we can test
41836      # for unknown variables in the end.
41837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41838
41839      # Check if we try to supply an empty value
41840      if test "x$NM" = x; then
41841        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41842$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41843        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41844$as_echo_n "checking for NM... " >&6; }
41845        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41846$as_echo "disabled" >&6; }
41847      else
41848        # Check if the provided tool contains a complete path.
41849        tool_specified="$NM"
41850        tool_basename="${tool_specified##*/}"
41851        if test "x$tool_basename" = "x$tool_specified"; then
41852          # A command without a complete path is provided, search $PATH.
41853          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41854$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41855          # Extract the first word of "$tool_basename", so it can be a program name with args.
41856set dummy $tool_basename; ac_word=$2
41857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41858$as_echo_n "checking for $ac_word... " >&6; }
41859if ${ac_cv_path_NM+:} false; then :
41860  $as_echo_n "(cached) " >&6
41861else
41862  case $NM in
41863  [\\/]* | ?:[\\/]*)
41864  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41865  ;;
41866  *)
41867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41868for as_dir in $PATH
41869do
41870  IFS=$as_save_IFS
41871  test -z "$as_dir" && as_dir=.
41872    for ac_exec_ext in '' $ac_executable_extensions; do
41873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41874    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41876    break 2
41877  fi
41878done
41879  done
41880IFS=$as_save_IFS
41881
41882  ;;
41883esac
41884fi
41885NM=$ac_cv_path_NM
41886if test -n "$NM"; then
41887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41888$as_echo "$NM" >&6; }
41889else
41890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41891$as_echo "no" >&6; }
41892fi
41893
41894
41895          if test "x$NM" = x; then
41896            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41897          fi
41898        else
41899          # Otherwise we believe it is a complete path. Use it as it is.
41900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41901$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41902          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41903$as_echo_n "checking for NM... " >&6; }
41904          if test ! -x "$tool_specified"; then
41905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41906$as_echo "not found" >&6; }
41907            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41908          fi
41909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41910$as_echo "$tool_specified" >&6; }
41911        fi
41912      fi
41913    fi
41914
41915  fi
41916
41917
41918    else
41919
41920
41921  # Publish this variable in the help.
41922
41923
41924  if [ -z "${NM+x}" ]; then
41925    # The variable is not set by user, try to locate tool using the code snippet
41926    if test -n "$ac_tool_prefix"; then
41927  for ac_prog in nm
41928  do
41929    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41932$as_echo_n "checking for $ac_word... " >&6; }
41933if ${ac_cv_prog_NM+:} false; then :
41934  $as_echo_n "(cached) " >&6
41935else
41936  if test -n "$NM"; then
41937  ac_cv_prog_NM="$NM" # Let the user override the test.
41938else
41939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41940for as_dir in $PATH
41941do
41942  IFS=$as_save_IFS
41943  test -z "$as_dir" && as_dir=.
41944    for ac_exec_ext in '' $ac_executable_extensions; do
41945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41946    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41948    break 2
41949  fi
41950done
41951  done
41952IFS=$as_save_IFS
41953
41954fi
41955fi
41956NM=$ac_cv_prog_NM
41957if test -n "$NM"; then
41958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41959$as_echo "$NM" >&6; }
41960else
41961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41962$as_echo "no" >&6; }
41963fi
41964
41965
41966    test -n "$NM" && break
41967  done
41968fi
41969if test -z "$NM"; then
41970  ac_ct_NM=$NM
41971  for ac_prog in nm
41972do
41973  # Extract the first word of "$ac_prog", so it can be a program name with args.
41974set dummy $ac_prog; ac_word=$2
41975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41976$as_echo_n "checking for $ac_word... " >&6; }
41977if ${ac_cv_prog_ac_ct_NM+:} false; then :
41978  $as_echo_n "(cached) " >&6
41979else
41980  if test -n "$ac_ct_NM"; then
41981  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41982else
41983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41984for as_dir in $PATH
41985do
41986  IFS=$as_save_IFS
41987  test -z "$as_dir" && as_dir=.
41988    for ac_exec_ext in '' $ac_executable_extensions; do
41989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41990    ac_cv_prog_ac_ct_NM="$ac_prog"
41991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41992    break 2
41993  fi
41994done
41995  done
41996IFS=$as_save_IFS
41997
41998fi
41999fi
42000ac_ct_NM=$ac_cv_prog_ac_ct_NM
42001if test -n "$ac_ct_NM"; then
42002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42003$as_echo "$ac_ct_NM" >&6; }
42004else
42005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42006$as_echo "no" >&6; }
42007fi
42008
42009
42010  test -n "$ac_ct_NM" && break
42011done
42012
42013  if test "x$ac_ct_NM" = x; then
42014    NM=""
42015  else
42016    case $cross_compiling:$ac_tool_warned in
42017yes:)
42018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42020ac_tool_warned=yes ;;
42021esac
42022    NM=$ac_ct_NM
42023  fi
42024fi
42025
42026  else
42027    # The variable is set, but is it from the command line or the environment?
42028
42029    # Try to remove the string !NM! from our list.
42030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42032      # If it failed, the variable was not from the command line. Ignore it,
42033      # but warn the user (except for BASH, which is always set by the calling BASH).
42034      if test "xNM" != xBASH; then
42035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42036$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42037      fi
42038      # Try to locate tool using the code snippet
42039      if test -n "$ac_tool_prefix"; then
42040  for ac_prog in nm
42041  do
42042    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42043set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42045$as_echo_n "checking for $ac_word... " >&6; }
42046if ${ac_cv_prog_NM+:} false; then :
42047  $as_echo_n "(cached) " >&6
42048else
42049  if test -n "$NM"; then
42050  ac_cv_prog_NM="$NM" # Let the user override the test.
42051else
42052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42053for as_dir in $PATH
42054do
42055  IFS=$as_save_IFS
42056  test -z "$as_dir" && as_dir=.
42057    for ac_exec_ext in '' $ac_executable_extensions; do
42058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42059    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42061    break 2
42062  fi
42063done
42064  done
42065IFS=$as_save_IFS
42066
42067fi
42068fi
42069NM=$ac_cv_prog_NM
42070if test -n "$NM"; then
42071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42072$as_echo "$NM" >&6; }
42073else
42074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42075$as_echo "no" >&6; }
42076fi
42077
42078
42079    test -n "$NM" && break
42080  done
42081fi
42082if test -z "$NM"; then
42083  ac_ct_NM=$NM
42084  for ac_prog in nm
42085do
42086  # Extract the first word of "$ac_prog", so it can be a program name with args.
42087set dummy $ac_prog; ac_word=$2
42088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42089$as_echo_n "checking for $ac_word... " >&6; }
42090if ${ac_cv_prog_ac_ct_NM+:} false; then :
42091  $as_echo_n "(cached) " >&6
42092else
42093  if test -n "$ac_ct_NM"; then
42094  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42095else
42096as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42097for as_dir in $PATH
42098do
42099  IFS=$as_save_IFS
42100  test -z "$as_dir" && as_dir=.
42101    for ac_exec_ext in '' $ac_executable_extensions; do
42102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42103    ac_cv_prog_ac_ct_NM="$ac_prog"
42104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42105    break 2
42106  fi
42107done
42108  done
42109IFS=$as_save_IFS
42110
42111fi
42112fi
42113ac_ct_NM=$ac_cv_prog_ac_ct_NM
42114if test -n "$ac_ct_NM"; then
42115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42116$as_echo "$ac_ct_NM" >&6; }
42117else
42118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42119$as_echo "no" >&6; }
42120fi
42121
42122
42123  test -n "$ac_ct_NM" && break
42124done
42125
42126  if test "x$ac_ct_NM" = x; then
42127    NM=""
42128  else
42129    case $cross_compiling:$ac_tool_warned in
42130yes:)
42131{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42132$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42133ac_tool_warned=yes ;;
42134esac
42135    NM=$ac_ct_NM
42136  fi
42137fi
42138
42139    else
42140      # If it succeeded, then it was overridden by the user. We will use it
42141      # for the tool.
42142
42143      # First remove it from the list of overridden variables, so we can test
42144      # for unknown variables in the end.
42145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42146
42147      # Check if we try to supply an empty value
42148      if test "x$NM" = x; then
42149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42150$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42152$as_echo_n "checking for NM... " >&6; }
42153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42154$as_echo "disabled" >&6; }
42155      else
42156        # Check if the provided tool contains a complete path.
42157        tool_specified="$NM"
42158        tool_basename="${tool_specified##*/}"
42159        if test "x$tool_basename" = "x$tool_specified"; then
42160          # A command without a complete path is provided, search $PATH.
42161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42162$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42163          # Extract the first word of "$tool_basename", so it can be a program name with args.
42164set dummy $tool_basename; ac_word=$2
42165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42166$as_echo_n "checking for $ac_word... " >&6; }
42167if ${ac_cv_path_NM+:} false; then :
42168  $as_echo_n "(cached) " >&6
42169else
42170  case $NM in
42171  [\\/]* | ?:[\\/]*)
42172  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42173  ;;
42174  *)
42175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42176for as_dir in $PATH
42177do
42178  IFS=$as_save_IFS
42179  test -z "$as_dir" && as_dir=.
42180    for ac_exec_ext in '' $ac_executable_extensions; do
42181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42182    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42184    break 2
42185  fi
42186done
42187  done
42188IFS=$as_save_IFS
42189
42190  ;;
42191esac
42192fi
42193NM=$ac_cv_path_NM
42194if test -n "$NM"; then
42195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42196$as_echo "$NM" >&6; }
42197else
42198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42199$as_echo "no" >&6; }
42200fi
42201
42202
42203          if test "x$NM" = x; then
42204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42205          fi
42206        else
42207          # Otherwise we believe it is a complete path. Use it as it is.
42208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42209$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42211$as_echo_n "checking for NM... " >&6; }
42212          if test ! -x "$tool_specified"; then
42213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42214$as_echo "not found" >&6; }
42215            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42216          fi
42217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42218$as_echo "$tool_specified" >&6; }
42219        fi
42220      fi
42221    fi
42222
42223  fi
42224
42225
42226    fi
42227
42228  # Only process if variable expands to non-empty
42229
42230  if test "x$NM" != x; then
42231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42232
42233  # First separate the path from the arguments. This will split at the first
42234  # space.
42235  complete="$NM"
42236  path="${complete%% *}"
42237  tmp="$complete EOL"
42238  arguments="${tmp#* }"
42239
42240  # Input might be given as Windows format, start by converting to
42241  # unix format.
42242  new_path=`$CYGPATH -u "$path"`
42243
42244  # Now try to locate executable using which
42245  new_path=`$WHICH "$new_path" 2> /dev/null`
42246  # bat and cmd files are not always considered executable in cygwin causing which
42247  # to not find them
42248  if test "x$new_path" = x \
42249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42251    new_path=`$CYGPATH -u "$path"`
42252  fi
42253  if test "x$new_path" = x; then
42254    # Oops. Which didn't find the executable.
42255    # The splitting of arguments from the executable at a space might have been incorrect,
42256    # since paths with space are more likely in Windows. Give it another try with the whole
42257    # argument.
42258    path="$complete"
42259    arguments="EOL"
42260    new_path=`$CYGPATH -u "$path"`
42261    new_path=`$WHICH "$new_path" 2> /dev/null`
42262    # bat and cmd files are not always considered executable in cygwin causing which
42263    # to not find them
42264    if test "x$new_path" = x \
42265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42267      new_path=`$CYGPATH -u "$path"`
42268    fi
42269    if test "x$new_path" = x; then
42270      # It's still not found. Now this is an unrecoverable error.
42271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42272$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42273      has_space=`$ECHO "$complete" | $GREP " "`
42274      if test "x$has_space" != x; then
42275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42277      fi
42278      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42279    fi
42280  fi
42281
42282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42285  # "foo.exe" is OK but "foo" is an error.
42286  #
42287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42288  # It is also a way to make sure we got the proper file name for the real test later on.
42289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42290  if test "x$test_shortpath" = x; then
42291    # Short path failed, file does not exist as specified.
42292    # Try adding .exe or .cmd
42293    if test -f "${new_path}.exe"; then
42294      input_to_shortpath="${new_path}.exe"
42295    elif test -f "${new_path}.cmd"; then
42296      input_to_shortpath="${new_path}.cmd"
42297    else
42298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42299$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42302      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42303    fi
42304  else
42305    input_to_shortpath="$new_path"
42306  fi
42307
42308  # Call helper function which possibly converts this using DOS-style short mode.
42309  # If so, the updated path is stored in $new_path.
42310  new_path="$input_to_shortpath"
42311
42312  input_path="$input_to_shortpath"
42313  # Check if we need to convert this using DOS-style short mode. If the path
42314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42315  # take no chances and rewrite it.
42316  # Note: m4 eats our [], so we need to use [ and ] instead.
42317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42318  if test "x$has_forbidden_chars" != x; then
42319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42323      # Going to short mode and back again did indeed matter. Since short mode is
42324      # case insensitive, let's make it lowercase to improve readability.
42325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42326      # Now convert it back to Unix-style (cygpath)
42327      input_path=`$CYGPATH -u "$shortmode_path"`
42328      new_path="$input_path"
42329    fi
42330  fi
42331
42332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42333  if test "x$test_cygdrive_prefix" = x; then
42334    # As a simple fix, exclude /usr/bin since it's not a real path.
42335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42337      # a path prefixed by /cygdrive for fixpath to work.
42338      new_path="$CYGWIN_ROOT_PATH$input_path"
42339    fi
42340  fi
42341
42342  # remove trailing .exe if any
42343  new_path="${new_path/%.exe/}"
42344
42345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42346
42347  # First separate the path from the arguments. This will split at the first
42348  # space.
42349  complete="$NM"
42350  path="${complete%% *}"
42351  tmp="$complete EOL"
42352  arguments="${tmp#* }"
42353
42354  # Input might be given as Windows format, start by converting to
42355  # unix format.
42356  new_path="$path"
42357
42358  windows_path="$new_path"
42359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42360    unix_path=`$CYGPATH -u "$windows_path"`
42361    new_path="$unix_path"
42362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42364    new_path="$unix_path"
42365  fi
42366
42367
42368  # Now try to locate executable using which
42369  new_path=`$WHICH "$new_path" 2> /dev/null`
42370
42371  if test "x$new_path" = x; then
42372    # Oops. Which didn't find the executable.
42373    # The splitting of arguments from the executable at a space might have been incorrect,
42374    # since paths with space are more likely in Windows. Give it another try with the whole
42375    # argument.
42376    path="$complete"
42377    arguments="EOL"
42378    new_path="$path"
42379
42380  windows_path="$new_path"
42381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42382    unix_path=`$CYGPATH -u "$windows_path"`
42383    new_path="$unix_path"
42384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42386    new_path="$unix_path"
42387  fi
42388
42389
42390    new_path=`$WHICH "$new_path" 2> /dev/null`
42391    # bat and cmd files are not always considered executable in MSYS causing which
42392    # to not find them
42393    if test "x$new_path" = x \
42394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42396      new_path="$path"
42397
42398  windows_path="$new_path"
42399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42400    unix_path=`$CYGPATH -u "$windows_path"`
42401    new_path="$unix_path"
42402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42404    new_path="$unix_path"
42405  fi
42406
42407    fi
42408
42409    if test "x$new_path" = x; then
42410      # It's still not found. Now this is an unrecoverable error.
42411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42412$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42413      has_space=`$ECHO "$complete" | $GREP " "`
42414      if test "x$has_space" != x; then
42415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42417      fi
42418      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42419    fi
42420  fi
42421
42422  # Now new_path has a complete unix path to the binary
42423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42424    # Keep paths in /bin as-is, but remove trailing .exe if any
42425    new_path="${new_path/%.exe/}"
42426    # Do not save /bin paths to all_fixpath_prefixes!
42427  else
42428    # Not in mixed or Windows style, start by that.
42429    new_path=`cmd //c echo $new_path`
42430
42431  input_path="$new_path"
42432  # Check if we need to convert this using DOS-style short mode. If the path
42433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42434  # take no chances and rewrite it.
42435  # Note: m4 eats our [], so we need to use [ and ] instead.
42436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42437  if test "x$has_forbidden_chars" != x; then
42438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42440  fi
42441
42442    # Output is in $new_path
42443
42444  windows_path="$new_path"
42445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42446    unix_path=`$CYGPATH -u "$windows_path"`
42447    new_path="$unix_path"
42448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42450    new_path="$unix_path"
42451  fi
42452
42453    # remove trailing .exe if any
42454    new_path="${new_path/%.exe/}"
42455
42456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42458  fi
42459
42460    else
42461      # We're on a unix platform. Hooray! :)
42462      # First separate the path from the arguments. This will split at the first
42463      # space.
42464      complete="$NM"
42465      path="${complete%% *}"
42466      tmp="$complete EOL"
42467      arguments="${tmp#* }"
42468
42469      # Cannot rely on the command "which" here since it doesn't always work.
42470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42471      if test -z "$is_absolute_path"; then
42472        # Path to executable is not absolute. Find it.
42473        IFS_save="$IFS"
42474        IFS=:
42475        for p in $PATH; do
42476          if test -f "$p/$path" && test -x "$p/$path"; then
42477            new_path="$p/$path"
42478            break
42479          fi
42480        done
42481        IFS="$IFS_save"
42482      else
42483        # This is an absolute path, we can use it without further modifications.
42484        new_path="$path"
42485      fi
42486
42487      if test "x$new_path" = x; then
42488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42489$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42490        has_space=`$ECHO "$complete" | $GREP " "`
42491        if test "x$has_space" != x; then
42492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42494        fi
42495        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42496      fi
42497    fi
42498
42499    # Now join together the path and the arguments once again
42500    if test "x$arguments" != xEOL; then
42501      new_complete="$new_path ${arguments% *}"
42502    else
42503      new_complete="$new_path"
42504    fi
42505
42506    if test "x$complete" != "x$new_complete"; then
42507      NM="$new_complete"
42508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42509$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42510    fi
42511  fi
42512
42513    GNM="$NM"
42514
42515  fi
42516
42517  # objcopy is used for moving debug symbols to separate files when
42518  # full debug symbols are enabled.
42519  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42520
42521
42522  # Publish this variable in the help.
42523
42524
42525  if [ -z "${OBJCOPY+x}" ]; then
42526    # The variable is not set by user, try to locate tool using the code snippet
42527    if test -n "$ac_tool_prefix"; then
42528  for ac_prog in gobjcopy objcopy
42529  do
42530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42533$as_echo_n "checking for $ac_word... " >&6; }
42534if ${ac_cv_prog_OBJCOPY+:} false; then :
42535  $as_echo_n "(cached) " >&6
42536else
42537  if test -n "$OBJCOPY"; then
42538  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42539else
42540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42541for as_dir in $PATH
42542do
42543  IFS=$as_save_IFS
42544  test -z "$as_dir" && as_dir=.
42545    for ac_exec_ext in '' $ac_executable_extensions; do
42546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42547    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42549    break 2
42550  fi
42551done
42552  done
42553IFS=$as_save_IFS
42554
42555fi
42556fi
42557OBJCOPY=$ac_cv_prog_OBJCOPY
42558if test -n "$OBJCOPY"; then
42559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42560$as_echo "$OBJCOPY" >&6; }
42561else
42562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42563$as_echo "no" >&6; }
42564fi
42565
42566
42567    test -n "$OBJCOPY" && break
42568  done
42569fi
42570if test -z "$OBJCOPY"; then
42571  ac_ct_OBJCOPY=$OBJCOPY
42572  for ac_prog in gobjcopy objcopy
42573do
42574  # Extract the first word of "$ac_prog", so it can be a program name with args.
42575set dummy $ac_prog; ac_word=$2
42576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42577$as_echo_n "checking for $ac_word... " >&6; }
42578if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42579  $as_echo_n "(cached) " >&6
42580else
42581  if test -n "$ac_ct_OBJCOPY"; then
42582  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42583else
42584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42585for as_dir in $PATH
42586do
42587  IFS=$as_save_IFS
42588  test -z "$as_dir" && as_dir=.
42589    for ac_exec_ext in '' $ac_executable_extensions; do
42590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42591    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42593    break 2
42594  fi
42595done
42596  done
42597IFS=$as_save_IFS
42598
42599fi
42600fi
42601ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42602if test -n "$ac_ct_OBJCOPY"; then
42603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42604$as_echo "$ac_ct_OBJCOPY" >&6; }
42605else
42606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42607$as_echo "no" >&6; }
42608fi
42609
42610
42611  test -n "$ac_ct_OBJCOPY" && break
42612done
42613
42614  if test "x$ac_ct_OBJCOPY" = x; then
42615    OBJCOPY=""
42616  else
42617    case $cross_compiling:$ac_tool_warned in
42618yes:)
42619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42621ac_tool_warned=yes ;;
42622esac
42623    OBJCOPY=$ac_ct_OBJCOPY
42624  fi
42625fi
42626
42627  else
42628    # The variable is set, but is it from the command line or the environment?
42629
42630    # Try to remove the string !OBJCOPY! from our list.
42631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42633      # If it failed, the variable was not from the command line. Ignore it,
42634      # but warn the user (except for BASH, which is always set by the calling BASH).
42635      if test "xOBJCOPY" != xBASH; then
42636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42637$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42638      fi
42639      # Try to locate tool using the code snippet
42640      if test -n "$ac_tool_prefix"; then
42641  for ac_prog in gobjcopy objcopy
42642  do
42643    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42644set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42646$as_echo_n "checking for $ac_word... " >&6; }
42647if ${ac_cv_prog_OBJCOPY+:} false; then :
42648  $as_echo_n "(cached) " >&6
42649else
42650  if test -n "$OBJCOPY"; then
42651  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42652else
42653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42654for as_dir in $PATH
42655do
42656  IFS=$as_save_IFS
42657  test -z "$as_dir" && as_dir=.
42658    for ac_exec_ext in '' $ac_executable_extensions; do
42659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42660    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42662    break 2
42663  fi
42664done
42665  done
42666IFS=$as_save_IFS
42667
42668fi
42669fi
42670OBJCOPY=$ac_cv_prog_OBJCOPY
42671if test -n "$OBJCOPY"; then
42672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42673$as_echo "$OBJCOPY" >&6; }
42674else
42675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42676$as_echo "no" >&6; }
42677fi
42678
42679
42680    test -n "$OBJCOPY" && break
42681  done
42682fi
42683if test -z "$OBJCOPY"; then
42684  ac_ct_OBJCOPY=$OBJCOPY
42685  for ac_prog in gobjcopy objcopy
42686do
42687  # Extract the first word of "$ac_prog", so it can be a program name with args.
42688set dummy $ac_prog; ac_word=$2
42689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42690$as_echo_n "checking for $ac_word... " >&6; }
42691if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42692  $as_echo_n "(cached) " >&6
42693else
42694  if test -n "$ac_ct_OBJCOPY"; then
42695  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42696else
42697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42698for as_dir in $PATH
42699do
42700  IFS=$as_save_IFS
42701  test -z "$as_dir" && as_dir=.
42702    for ac_exec_ext in '' $ac_executable_extensions; do
42703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42704    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42706    break 2
42707  fi
42708done
42709  done
42710IFS=$as_save_IFS
42711
42712fi
42713fi
42714ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42715if test -n "$ac_ct_OBJCOPY"; then
42716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42717$as_echo "$ac_ct_OBJCOPY" >&6; }
42718else
42719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42720$as_echo "no" >&6; }
42721fi
42722
42723
42724  test -n "$ac_ct_OBJCOPY" && break
42725done
42726
42727  if test "x$ac_ct_OBJCOPY" = x; then
42728    OBJCOPY=""
42729  else
42730    case $cross_compiling:$ac_tool_warned in
42731yes:)
42732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42734ac_tool_warned=yes ;;
42735esac
42736    OBJCOPY=$ac_ct_OBJCOPY
42737  fi
42738fi
42739
42740    else
42741      # If it succeeded, then it was overridden by the user. We will use it
42742      # for the tool.
42743
42744      # First remove it from the list of overridden variables, so we can test
42745      # for unknown variables in the end.
42746      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42747
42748      # Check if we try to supply an empty value
42749      if test "x$OBJCOPY" = x; then
42750        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42751$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42752        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42753$as_echo_n "checking for OBJCOPY... " >&6; }
42754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42755$as_echo "disabled" >&6; }
42756      else
42757        # Check if the provided tool contains a complete path.
42758        tool_specified="$OBJCOPY"
42759        tool_basename="${tool_specified##*/}"
42760        if test "x$tool_basename" = "x$tool_specified"; then
42761          # A command without a complete path is provided, search $PATH.
42762          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42763$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42764          # Extract the first word of "$tool_basename", so it can be a program name with args.
42765set dummy $tool_basename; ac_word=$2
42766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42767$as_echo_n "checking for $ac_word... " >&6; }
42768if ${ac_cv_path_OBJCOPY+:} false; then :
42769  $as_echo_n "(cached) " >&6
42770else
42771  case $OBJCOPY in
42772  [\\/]* | ?:[\\/]*)
42773  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42774  ;;
42775  *)
42776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42777for as_dir in $PATH
42778do
42779  IFS=$as_save_IFS
42780  test -z "$as_dir" && as_dir=.
42781    for ac_exec_ext in '' $ac_executable_extensions; do
42782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42783    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42785    break 2
42786  fi
42787done
42788  done
42789IFS=$as_save_IFS
42790
42791  ;;
42792esac
42793fi
42794OBJCOPY=$ac_cv_path_OBJCOPY
42795if test -n "$OBJCOPY"; then
42796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42797$as_echo "$OBJCOPY" >&6; }
42798else
42799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42800$as_echo "no" >&6; }
42801fi
42802
42803
42804          if test "x$OBJCOPY" = x; then
42805            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42806          fi
42807        else
42808          # Otherwise we believe it is a complete path. Use it as it is.
42809          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42810$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42811          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42812$as_echo_n "checking for OBJCOPY... " >&6; }
42813          if test ! -x "$tool_specified"; then
42814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42815$as_echo "not found" >&6; }
42816            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42817          fi
42818          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42819$as_echo "$tool_specified" >&6; }
42820        fi
42821      fi
42822    fi
42823
42824  fi
42825
42826
42827    # Only call fixup if objcopy was found.
42828    if test -n "$OBJCOPY"; then
42829
42830  # Only process if variable expands to non-empty
42831
42832  if test "x$OBJCOPY" != x; then
42833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42834
42835  # First separate the path from the arguments. This will split at the first
42836  # space.
42837  complete="$OBJCOPY"
42838  path="${complete%% *}"
42839  tmp="$complete EOL"
42840  arguments="${tmp#* }"
42841
42842  # Input might be given as Windows format, start by converting to
42843  # unix format.
42844  new_path=`$CYGPATH -u "$path"`
42845
42846  # Now try to locate executable using which
42847  new_path=`$WHICH "$new_path" 2> /dev/null`
42848  # bat and cmd files are not always considered executable in cygwin causing which
42849  # to not find them
42850  if test "x$new_path" = x \
42851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42853    new_path=`$CYGPATH -u "$path"`
42854  fi
42855  if test "x$new_path" = x; then
42856    # Oops. Which didn't find the executable.
42857    # The splitting of arguments from the executable at a space might have been incorrect,
42858    # since paths with space are more likely in Windows. Give it another try with the whole
42859    # argument.
42860    path="$complete"
42861    arguments="EOL"
42862    new_path=`$CYGPATH -u "$path"`
42863    new_path=`$WHICH "$new_path" 2> /dev/null`
42864    # bat and cmd files are not always considered executable in cygwin causing which
42865    # to not find them
42866    if test "x$new_path" = x \
42867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42869      new_path=`$CYGPATH -u "$path"`
42870    fi
42871    if test "x$new_path" = x; then
42872      # It's still not found. Now this is an unrecoverable error.
42873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42874$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42875      has_space=`$ECHO "$complete" | $GREP " "`
42876      if test "x$has_space" != x; then
42877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42879      fi
42880      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42881    fi
42882  fi
42883
42884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42887  # "foo.exe" is OK but "foo" is an error.
42888  #
42889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42890  # It is also a way to make sure we got the proper file name for the real test later on.
42891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42892  if test "x$test_shortpath" = x; then
42893    # Short path failed, file does not exist as specified.
42894    # Try adding .exe or .cmd
42895    if test -f "${new_path}.exe"; then
42896      input_to_shortpath="${new_path}.exe"
42897    elif test -f "${new_path}.cmd"; then
42898      input_to_shortpath="${new_path}.cmd"
42899    else
42900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42901$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42904      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42905    fi
42906  else
42907    input_to_shortpath="$new_path"
42908  fi
42909
42910  # Call helper function which possibly converts this using DOS-style short mode.
42911  # If so, the updated path is stored in $new_path.
42912  new_path="$input_to_shortpath"
42913
42914  input_path="$input_to_shortpath"
42915  # Check if we need to convert this using DOS-style short mode. If the path
42916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42917  # take no chances and rewrite it.
42918  # Note: m4 eats our [], so we need to use [ and ] instead.
42919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42920  if test "x$has_forbidden_chars" != x; then
42921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42925      # Going to short mode and back again did indeed matter. Since short mode is
42926      # case insensitive, let's make it lowercase to improve readability.
42927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42928      # Now convert it back to Unix-style (cygpath)
42929      input_path=`$CYGPATH -u "$shortmode_path"`
42930      new_path="$input_path"
42931    fi
42932  fi
42933
42934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42935  if test "x$test_cygdrive_prefix" = x; then
42936    # As a simple fix, exclude /usr/bin since it's not a real path.
42937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42939      # a path prefixed by /cygdrive for fixpath to work.
42940      new_path="$CYGWIN_ROOT_PATH$input_path"
42941    fi
42942  fi
42943
42944  # remove trailing .exe if any
42945  new_path="${new_path/%.exe/}"
42946
42947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42948
42949  # First separate the path from the arguments. This will split at the first
42950  # space.
42951  complete="$OBJCOPY"
42952  path="${complete%% *}"
42953  tmp="$complete EOL"
42954  arguments="${tmp#* }"
42955
42956  # Input might be given as Windows format, start by converting to
42957  # unix format.
42958  new_path="$path"
42959
42960  windows_path="$new_path"
42961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42962    unix_path=`$CYGPATH -u "$windows_path"`
42963    new_path="$unix_path"
42964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42966    new_path="$unix_path"
42967  fi
42968
42969
42970  # Now try to locate executable using which
42971  new_path=`$WHICH "$new_path" 2> /dev/null`
42972
42973  if test "x$new_path" = x; then
42974    # Oops. Which didn't find the executable.
42975    # The splitting of arguments from the executable at a space might have been incorrect,
42976    # since paths with space are more likely in Windows. Give it another try with the whole
42977    # argument.
42978    path="$complete"
42979    arguments="EOL"
42980    new_path="$path"
42981
42982  windows_path="$new_path"
42983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42984    unix_path=`$CYGPATH -u "$windows_path"`
42985    new_path="$unix_path"
42986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42988    new_path="$unix_path"
42989  fi
42990
42991
42992    new_path=`$WHICH "$new_path" 2> /dev/null`
42993    # bat and cmd files are not always considered executable in MSYS causing which
42994    # to not find them
42995    if test "x$new_path" = x \
42996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42998      new_path="$path"
42999
43000  windows_path="$new_path"
43001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43002    unix_path=`$CYGPATH -u "$windows_path"`
43003    new_path="$unix_path"
43004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43006    new_path="$unix_path"
43007  fi
43008
43009    fi
43010
43011    if test "x$new_path" = x; then
43012      # It's still not found. Now this is an unrecoverable error.
43013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43014$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43015      has_space=`$ECHO "$complete" | $GREP " "`
43016      if test "x$has_space" != x; then
43017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43019      fi
43020      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43021    fi
43022  fi
43023
43024  # Now new_path has a complete unix path to the binary
43025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43026    # Keep paths in /bin as-is, but remove trailing .exe if any
43027    new_path="${new_path/%.exe/}"
43028    # Do not save /bin paths to all_fixpath_prefixes!
43029  else
43030    # Not in mixed or Windows style, start by that.
43031    new_path=`cmd //c echo $new_path`
43032
43033  input_path="$new_path"
43034  # Check if we need to convert this using DOS-style short mode. If the path
43035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43036  # take no chances and rewrite it.
43037  # Note: m4 eats our [], so we need to use [ and ] instead.
43038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43039  if test "x$has_forbidden_chars" != x; then
43040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43042  fi
43043
43044    # Output is in $new_path
43045
43046  windows_path="$new_path"
43047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43048    unix_path=`$CYGPATH -u "$windows_path"`
43049    new_path="$unix_path"
43050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43052    new_path="$unix_path"
43053  fi
43054
43055    # remove trailing .exe if any
43056    new_path="${new_path/%.exe/}"
43057
43058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43060  fi
43061
43062    else
43063      # We're on a unix platform. Hooray! :)
43064      # First separate the path from the arguments. This will split at the first
43065      # space.
43066      complete="$OBJCOPY"
43067      path="${complete%% *}"
43068      tmp="$complete EOL"
43069      arguments="${tmp#* }"
43070
43071      # Cannot rely on the command "which" here since it doesn't always work.
43072      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43073      if test -z "$is_absolute_path"; then
43074        # Path to executable is not absolute. Find it.
43075        IFS_save="$IFS"
43076        IFS=:
43077        for p in $PATH; do
43078          if test -f "$p/$path" && test -x "$p/$path"; then
43079            new_path="$p/$path"
43080            break
43081          fi
43082        done
43083        IFS="$IFS_save"
43084      else
43085        # This is an absolute path, we can use it without further modifications.
43086        new_path="$path"
43087      fi
43088
43089      if test "x$new_path" = x; then
43090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43091$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43092        has_space=`$ECHO "$complete" | $GREP " "`
43093        if test "x$has_space" != x; then
43094          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43096        fi
43097        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43098      fi
43099    fi
43100
43101    # Now join together the path and the arguments once again
43102    if test "x$arguments" != xEOL; then
43103      new_complete="$new_path ${arguments% *}"
43104    else
43105      new_complete="$new_path"
43106    fi
43107
43108    if test "x$complete" != "x$new_complete"; then
43109      OBJCOPY="$new_complete"
43110      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43111$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43112    fi
43113  fi
43114
43115      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43116        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43117        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43118        # - version number is last blank separate word on first line
43119        # - version number formats that have been seen:
43120        #   - <major>.<minor>
43121        #   - <major>.<minor>.<micro>
43122        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43123        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43124         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43125              -e 's/.* //' \
43126              -e '/^[01]\./b bad' \
43127              -e '/^2\./{' \
43128              -e '  s/^2\.//' \
43129              -e '  /^[0-9]$/b bad' \
43130              -e '  /^[0-9]\./b bad' \
43131              -e '  /^1[0-9]$/b bad' \
43132              -e '  /^1[0-9]\./b bad' \
43133              -e '  /^20\./b bad' \
43134              -e '  /^21\.0$/b bad' \
43135              -e '  /^21\.0\./b bad' \
43136              -e '}' \
43137              -e ':good' \
43138              -e 's/.*/VALID_VERSION/p' \
43139              -e 'q' \
43140              -e ':bad' \
43141              -e 's/.*/BAD_VERSION/p' \
43142              -e 'q'`
43143        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43144          OBJCOPY=
43145          { $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
43146$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43147          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43148$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43149          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43150$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43151          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43152$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43153          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43154$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43155        fi
43156      fi
43157    fi
43158  fi
43159
43160
43161
43162  # Publish this variable in the help.
43163
43164
43165  if [ -z "${OBJDUMP+x}" ]; then
43166    # The variable is not set by user, try to locate tool using the code snippet
43167    if test -n "$ac_tool_prefix"; then
43168  for ac_prog in gobjdump objdump
43169  do
43170    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43171set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43173$as_echo_n "checking for $ac_word... " >&6; }
43174if ${ac_cv_prog_OBJDUMP+:} false; then :
43175  $as_echo_n "(cached) " >&6
43176else
43177  if test -n "$OBJDUMP"; then
43178  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43179else
43180as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43181for as_dir in $PATH
43182do
43183  IFS=$as_save_IFS
43184  test -z "$as_dir" && as_dir=.
43185    for ac_exec_ext in '' $ac_executable_extensions; do
43186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43187    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43189    break 2
43190  fi
43191done
43192  done
43193IFS=$as_save_IFS
43194
43195fi
43196fi
43197OBJDUMP=$ac_cv_prog_OBJDUMP
43198if test -n "$OBJDUMP"; then
43199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43200$as_echo "$OBJDUMP" >&6; }
43201else
43202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43203$as_echo "no" >&6; }
43204fi
43205
43206
43207    test -n "$OBJDUMP" && break
43208  done
43209fi
43210if test -z "$OBJDUMP"; then
43211  ac_ct_OBJDUMP=$OBJDUMP
43212  for ac_prog in gobjdump objdump
43213do
43214  # Extract the first word of "$ac_prog", so it can be a program name with args.
43215set dummy $ac_prog; ac_word=$2
43216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43217$as_echo_n "checking for $ac_word... " >&6; }
43218if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43219  $as_echo_n "(cached) " >&6
43220else
43221  if test -n "$ac_ct_OBJDUMP"; then
43222  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43223else
43224as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43225for as_dir in $PATH
43226do
43227  IFS=$as_save_IFS
43228  test -z "$as_dir" && as_dir=.
43229    for ac_exec_ext in '' $ac_executable_extensions; do
43230  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43231    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43233    break 2
43234  fi
43235done
43236  done
43237IFS=$as_save_IFS
43238
43239fi
43240fi
43241ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43242if test -n "$ac_ct_OBJDUMP"; then
43243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43244$as_echo "$ac_ct_OBJDUMP" >&6; }
43245else
43246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43247$as_echo "no" >&6; }
43248fi
43249
43250
43251  test -n "$ac_ct_OBJDUMP" && break
43252done
43253
43254  if test "x$ac_ct_OBJDUMP" = x; then
43255    OBJDUMP=""
43256  else
43257    case $cross_compiling:$ac_tool_warned in
43258yes:)
43259{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43260$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43261ac_tool_warned=yes ;;
43262esac
43263    OBJDUMP=$ac_ct_OBJDUMP
43264  fi
43265fi
43266
43267  else
43268    # The variable is set, but is it from the command line or the environment?
43269
43270    # Try to remove the string !OBJDUMP! from our list.
43271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43273      # If it failed, the variable was not from the command line. Ignore it,
43274      # but warn the user (except for BASH, which is always set by the calling BASH).
43275      if test "xOBJDUMP" != xBASH; then
43276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43277$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43278      fi
43279      # Try to locate tool using the code snippet
43280      if test -n "$ac_tool_prefix"; then
43281  for ac_prog in gobjdump objdump
43282  do
43283    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43284set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43286$as_echo_n "checking for $ac_word... " >&6; }
43287if ${ac_cv_prog_OBJDUMP+:} false; then :
43288  $as_echo_n "(cached) " >&6
43289else
43290  if test -n "$OBJDUMP"; then
43291  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43292else
43293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43294for as_dir in $PATH
43295do
43296  IFS=$as_save_IFS
43297  test -z "$as_dir" && as_dir=.
43298    for ac_exec_ext in '' $ac_executable_extensions; do
43299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43300    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43302    break 2
43303  fi
43304done
43305  done
43306IFS=$as_save_IFS
43307
43308fi
43309fi
43310OBJDUMP=$ac_cv_prog_OBJDUMP
43311if test -n "$OBJDUMP"; then
43312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43313$as_echo "$OBJDUMP" >&6; }
43314else
43315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43316$as_echo "no" >&6; }
43317fi
43318
43319
43320    test -n "$OBJDUMP" && break
43321  done
43322fi
43323if test -z "$OBJDUMP"; then
43324  ac_ct_OBJDUMP=$OBJDUMP
43325  for ac_prog in gobjdump objdump
43326do
43327  # Extract the first word of "$ac_prog", so it can be a program name with args.
43328set dummy $ac_prog; ac_word=$2
43329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43330$as_echo_n "checking for $ac_word... " >&6; }
43331if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43332  $as_echo_n "(cached) " >&6
43333else
43334  if test -n "$ac_ct_OBJDUMP"; then
43335  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43336else
43337as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43338for as_dir in $PATH
43339do
43340  IFS=$as_save_IFS
43341  test -z "$as_dir" && as_dir=.
43342    for ac_exec_ext in '' $ac_executable_extensions; do
43343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43344    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43346    break 2
43347  fi
43348done
43349  done
43350IFS=$as_save_IFS
43351
43352fi
43353fi
43354ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43355if test -n "$ac_ct_OBJDUMP"; then
43356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43357$as_echo "$ac_ct_OBJDUMP" >&6; }
43358else
43359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43360$as_echo "no" >&6; }
43361fi
43362
43363
43364  test -n "$ac_ct_OBJDUMP" && break
43365done
43366
43367  if test "x$ac_ct_OBJDUMP" = x; then
43368    OBJDUMP=""
43369  else
43370    case $cross_compiling:$ac_tool_warned in
43371yes:)
43372{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43373$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43374ac_tool_warned=yes ;;
43375esac
43376    OBJDUMP=$ac_ct_OBJDUMP
43377  fi
43378fi
43379
43380    else
43381      # If it succeeded, then it was overridden by the user. We will use it
43382      # for the tool.
43383
43384      # First remove it from the list of overridden variables, so we can test
43385      # for unknown variables in the end.
43386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43387
43388      # Check if we try to supply an empty value
43389      if test "x$OBJDUMP" = x; then
43390        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43391$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43393$as_echo_n "checking for OBJDUMP... " >&6; }
43394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43395$as_echo "disabled" >&6; }
43396      else
43397        # Check if the provided tool contains a complete path.
43398        tool_specified="$OBJDUMP"
43399        tool_basename="${tool_specified##*/}"
43400        if test "x$tool_basename" = "x$tool_specified"; then
43401          # A command without a complete path is provided, search $PATH.
43402          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43403$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43404          # Extract the first word of "$tool_basename", so it can be a program name with args.
43405set dummy $tool_basename; ac_word=$2
43406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43407$as_echo_n "checking for $ac_word... " >&6; }
43408if ${ac_cv_path_OBJDUMP+:} false; then :
43409  $as_echo_n "(cached) " >&6
43410else
43411  case $OBJDUMP in
43412  [\\/]* | ?:[\\/]*)
43413  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43414  ;;
43415  *)
43416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43417for as_dir in $PATH
43418do
43419  IFS=$as_save_IFS
43420  test -z "$as_dir" && as_dir=.
43421    for ac_exec_ext in '' $ac_executable_extensions; do
43422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43423    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43425    break 2
43426  fi
43427done
43428  done
43429IFS=$as_save_IFS
43430
43431  ;;
43432esac
43433fi
43434OBJDUMP=$ac_cv_path_OBJDUMP
43435if test -n "$OBJDUMP"; then
43436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43437$as_echo "$OBJDUMP" >&6; }
43438else
43439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43440$as_echo "no" >&6; }
43441fi
43442
43443
43444          if test "x$OBJDUMP" = x; then
43445            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43446          fi
43447        else
43448          # Otherwise we believe it is a complete path. Use it as it is.
43449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43450$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43451          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43452$as_echo_n "checking for OBJDUMP... " >&6; }
43453          if test ! -x "$tool_specified"; then
43454            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43455$as_echo "not found" >&6; }
43456            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43457          fi
43458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43459$as_echo "$tool_specified" >&6; }
43460        fi
43461      fi
43462    fi
43463
43464  fi
43465
43466
43467  if test "x$OBJDUMP" != x; then
43468    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43469    # bails if argument is missing.
43470
43471  # Only process if variable expands to non-empty
43472
43473  if test "x$OBJDUMP" != x; then
43474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43475
43476  # First separate the path from the arguments. This will split at the first
43477  # space.
43478  complete="$OBJDUMP"
43479  path="${complete%% *}"
43480  tmp="$complete EOL"
43481  arguments="${tmp#* }"
43482
43483  # Input might be given as Windows format, start by converting to
43484  # unix format.
43485  new_path=`$CYGPATH -u "$path"`
43486
43487  # Now try to locate executable using which
43488  new_path=`$WHICH "$new_path" 2> /dev/null`
43489  # bat and cmd files are not always considered executable in cygwin causing which
43490  # to not find them
43491  if test "x$new_path" = x \
43492      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43493      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43494    new_path=`$CYGPATH -u "$path"`
43495  fi
43496  if test "x$new_path" = x; then
43497    # Oops. Which didn't find the executable.
43498    # The splitting of arguments from the executable at a space might have been incorrect,
43499    # since paths with space are more likely in Windows. Give it another try with the whole
43500    # argument.
43501    path="$complete"
43502    arguments="EOL"
43503    new_path=`$CYGPATH -u "$path"`
43504    new_path=`$WHICH "$new_path" 2> /dev/null`
43505    # bat and cmd files are not always considered executable in cygwin causing which
43506    # to not find them
43507    if test "x$new_path" = x \
43508        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43509        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43510      new_path=`$CYGPATH -u "$path"`
43511    fi
43512    if test "x$new_path" = x; then
43513      # It's still not found. Now this is an unrecoverable error.
43514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43515$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43516      has_space=`$ECHO "$complete" | $GREP " "`
43517      if test "x$has_space" != x; then
43518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43520      fi
43521      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43522    fi
43523  fi
43524
43525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43528  # "foo.exe" is OK but "foo" is an error.
43529  #
43530  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43531  # It is also a way to make sure we got the proper file name for the real test later on.
43532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43533  if test "x$test_shortpath" = x; then
43534    # Short path failed, file does not exist as specified.
43535    # Try adding .exe or .cmd
43536    if test -f "${new_path}.exe"; then
43537      input_to_shortpath="${new_path}.exe"
43538    elif test -f "${new_path}.cmd"; then
43539      input_to_shortpath="${new_path}.cmd"
43540    else
43541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43542$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43543      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43544$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43545      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43546    fi
43547  else
43548    input_to_shortpath="$new_path"
43549  fi
43550
43551  # Call helper function which possibly converts this using DOS-style short mode.
43552  # If so, the updated path is stored in $new_path.
43553  new_path="$input_to_shortpath"
43554
43555  input_path="$input_to_shortpath"
43556  # Check if we need to convert this using DOS-style short mode. If the path
43557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43558  # take no chances and rewrite it.
43559  # Note: m4 eats our [], so we need to use [ and ] instead.
43560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43561  if test "x$has_forbidden_chars" != x; then
43562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43563    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43564    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43565    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43566      # Going to short mode and back again did indeed matter. Since short mode is
43567      # case insensitive, let's make it lowercase to improve readability.
43568      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43569      # Now convert it back to Unix-style (cygpath)
43570      input_path=`$CYGPATH -u "$shortmode_path"`
43571      new_path="$input_path"
43572    fi
43573  fi
43574
43575  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43576  if test "x$test_cygdrive_prefix" = x; then
43577    # As a simple fix, exclude /usr/bin since it's not a real path.
43578    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43579      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43580      # a path prefixed by /cygdrive for fixpath to work.
43581      new_path="$CYGWIN_ROOT_PATH$input_path"
43582    fi
43583  fi
43584
43585  # remove trailing .exe if any
43586  new_path="${new_path/%.exe/}"
43587
43588    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43589
43590  # First separate the path from the arguments. This will split at the first
43591  # space.
43592  complete="$OBJDUMP"
43593  path="${complete%% *}"
43594  tmp="$complete EOL"
43595  arguments="${tmp#* }"
43596
43597  # Input might be given as Windows format, start by converting to
43598  # unix format.
43599  new_path="$path"
43600
43601  windows_path="$new_path"
43602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43603    unix_path=`$CYGPATH -u "$windows_path"`
43604    new_path="$unix_path"
43605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43607    new_path="$unix_path"
43608  fi
43609
43610
43611  # Now try to locate executable using which
43612  new_path=`$WHICH "$new_path" 2> /dev/null`
43613
43614  if test "x$new_path" = x; then
43615    # Oops. Which didn't find the executable.
43616    # The splitting of arguments from the executable at a space might have been incorrect,
43617    # since paths with space are more likely in Windows. Give it another try with the whole
43618    # argument.
43619    path="$complete"
43620    arguments="EOL"
43621    new_path="$path"
43622
43623  windows_path="$new_path"
43624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43625    unix_path=`$CYGPATH -u "$windows_path"`
43626    new_path="$unix_path"
43627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43629    new_path="$unix_path"
43630  fi
43631
43632
43633    new_path=`$WHICH "$new_path" 2> /dev/null`
43634    # bat and cmd files are not always considered executable in MSYS causing which
43635    # to not find them
43636    if test "x$new_path" = x \
43637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43639      new_path="$path"
43640
43641  windows_path="$new_path"
43642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43643    unix_path=`$CYGPATH -u "$windows_path"`
43644    new_path="$unix_path"
43645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43647    new_path="$unix_path"
43648  fi
43649
43650    fi
43651
43652    if test "x$new_path" = x; then
43653      # It's still not found. Now this is an unrecoverable error.
43654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43655$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43656      has_space=`$ECHO "$complete" | $GREP " "`
43657      if test "x$has_space" != x; then
43658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43660      fi
43661      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43662    fi
43663  fi
43664
43665  # Now new_path has a complete unix path to the binary
43666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43667    # Keep paths in /bin as-is, but remove trailing .exe if any
43668    new_path="${new_path/%.exe/}"
43669    # Do not save /bin paths to all_fixpath_prefixes!
43670  else
43671    # Not in mixed or Windows style, start by that.
43672    new_path=`cmd //c echo $new_path`
43673
43674  input_path="$new_path"
43675  # Check if we need to convert this using DOS-style short mode. If the path
43676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43677  # take no chances and rewrite it.
43678  # Note: m4 eats our [], so we need to use [ and ] instead.
43679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43680  if test "x$has_forbidden_chars" != x; then
43681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43683  fi
43684
43685    # Output is in $new_path
43686
43687  windows_path="$new_path"
43688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43689    unix_path=`$CYGPATH -u "$windows_path"`
43690    new_path="$unix_path"
43691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43693    new_path="$unix_path"
43694  fi
43695
43696    # remove trailing .exe if any
43697    new_path="${new_path/%.exe/}"
43698
43699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43701  fi
43702
43703    else
43704      # We're on a unix platform. Hooray! :)
43705      # First separate the path from the arguments. This will split at the first
43706      # space.
43707      complete="$OBJDUMP"
43708      path="${complete%% *}"
43709      tmp="$complete EOL"
43710      arguments="${tmp#* }"
43711
43712      # Cannot rely on the command "which" here since it doesn't always work.
43713      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43714      if test -z "$is_absolute_path"; then
43715        # Path to executable is not absolute. Find it.
43716        IFS_save="$IFS"
43717        IFS=:
43718        for p in $PATH; do
43719          if test -f "$p/$path" && test -x "$p/$path"; then
43720            new_path="$p/$path"
43721            break
43722          fi
43723        done
43724        IFS="$IFS_save"
43725      else
43726        # This is an absolute path, we can use it without further modifications.
43727        new_path="$path"
43728      fi
43729
43730      if test "x$new_path" = x; then
43731        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43732$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43733        has_space=`$ECHO "$complete" | $GREP " "`
43734        if test "x$has_space" != x; then
43735          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43736$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43737        fi
43738        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43739      fi
43740    fi
43741
43742    # Now join together the path and the arguments once again
43743    if test "x$arguments" != xEOL; then
43744      new_complete="$new_path ${arguments% *}"
43745    else
43746      new_complete="$new_path"
43747    fi
43748
43749    if test "x$complete" != "x$new_complete"; then
43750      OBJDUMP="$new_complete"
43751      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43752$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43753    fi
43754  fi
43755
43756  fi
43757
43758
43759  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43760  # to remain in place. Otherwise the compiler will not work in some siutations
43761  # in later configure checks.
43762  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43763    PATH="$OLD_PATH"
43764  fi
43765
43766  # Restore the flags to the user specified values.
43767  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43768  CFLAGS="$ORG_CFLAGS"
43769  CXXFLAGS="$ORG_CXXFLAGS"
43770
43771
43772# Finally do some processing after the detection phase
43773
43774  if test "x$COMPILE_TYPE" = "xcross"; then
43775    # Now we need to find a C/C++ compiler that can build executables for the
43776    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43777    # used once. Also, we need to do this without adding a tools dir to the
43778    # path, otherwise we might pick up cross-compilers which don't use standard
43779    # naming.
43780
43781    OLDPATH="$PATH"
43782
43783
43784# Check whether --with-build-devkit was given.
43785if test "${with_build_devkit+set}" = set; then :
43786  withval=$with_build_devkit;
43787fi
43788
43789    if test "x$with_build_devkit" = "xyes"; then
43790      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43791    elif test -n "$with_build_devkit"; then
43792      if test ! -d "$with_build_devkit"; then
43793        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43794      else
43795
43796  # Only process if variable expands to non-empty
43797
43798  if test "x$with_build_devkit" != x; then
43799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43800
43801  # Input might be given as Windows format, start by converting to
43802  # unix format.
43803  path="$with_build_devkit"
43804  new_path=`$CYGPATH -u "$path"`
43805
43806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43809  # "foo.exe" is OK but "foo" is an error.
43810  #
43811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43812  # It is also a way to make sure we got the proper file name for the real test later on.
43813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43814  if test "x$test_shortpath" = x; then
43815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43816$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43817    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43818  fi
43819
43820  # Call helper function which possibly converts this using DOS-style short mode.
43821  # If so, the updated path is stored in $new_path.
43822
43823  input_path="$new_path"
43824  # Check if we need to convert this using DOS-style short mode. If the path
43825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43826  # take no chances and rewrite it.
43827  # Note: m4 eats our [], so we need to use [ and ] instead.
43828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43829  if test "x$has_forbidden_chars" != x; then
43830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43834      # Going to short mode and back again did indeed matter. Since short mode is
43835      # case insensitive, let's make it lowercase to improve readability.
43836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43837      # Now convert it back to Unix-style (cygpath)
43838      input_path=`$CYGPATH -u "$shortmode_path"`
43839      new_path="$input_path"
43840    fi
43841  fi
43842
43843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43844  if test "x$test_cygdrive_prefix" = x; then
43845    # As a simple fix, exclude /usr/bin since it's not a real path.
43846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43848      # a path prefixed by /cygdrive for fixpath to work.
43849      new_path="$CYGWIN_ROOT_PATH$input_path"
43850    fi
43851  fi
43852
43853
43854  if test "x$path" != "x$new_path"; then
43855    with_build_devkit="$new_path"
43856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43857$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43858  fi
43859
43860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43861
43862  path="$with_build_devkit"
43863  has_colon=`$ECHO $path | $GREP ^.:`
43864  new_path="$path"
43865  if test "x$has_colon" = x; then
43866    # Not in mixed or Windows style, start by that.
43867    new_path=`cmd //c echo $path`
43868  fi
43869
43870
43871  input_path="$new_path"
43872  # Check if we need to convert this using DOS-style short mode. If the path
43873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43874  # take no chances and rewrite it.
43875  # Note: m4 eats our [], so we need to use [ and ] instead.
43876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43877  if test "x$has_forbidden_chars" != x; then
43878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43880  fi
43881
43882
43883  windows_path="$new_path"
43884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43885    unix_path=`$CYGPATH -u "$windows_path"`
43886    new_path="$unix_path"
43887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43889    new_path="$unix_path"
43890  fi
43891
43892  if test "x$path" != "x$new_path"; then
43893    with_build_devkit="$new_path"
43894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43895$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43896  fi
43897
43898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43900
43901    else
43902      # We're on a unix platform. Hooray! :)
43903      path="$with_build_devkit"
43904      has_space=`$ECHO "$path" | $GREP " "`
43905      if test "x$has_space" != x; then
43906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43907$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43909      fi
43910
43911      # Use eval to expand a potential ~
43912      eval path="$path"
43913      if test ! -f "$path" && test ! -d "$path"; then
43914        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43915      fi
43916
43917      if test -d "$path"; then
43918        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43919      else
43920        dir="`$DIRNAME "$path"`"
43921        base="`$BASENAME "$path"`"
43922        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43923      fi
43924    fi
43925  fi
43926
43927        BUILD_DEVKIT_ROOT="$with_build_devkit"
43928        # Check for a meta data info file in the root of the devkit
43929        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43930          # Process devkit.info so that existing devkit variables are not
43931          # modified by this
43932          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43933              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43934              -e "s/\$host/\$build/g" \
43935              $BUILD_DEVKIT_ROOT/devkit.info \
43936              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43937          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43938          # This potentially sets the following:
43939          # A descriptive name of the devkit
43940
43941  if test "x$BUILD_DEVKIT_NAME" = x; then
43942    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43943  fi
43944
43945          # Corresponds to --with-extra-path
43946
43947  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43948    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43949  fi
43950
43951          # Corresponds to --with-toolchain-path
43952
43953  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43954    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43955  fi
43956
43957          # Corresponds to --with-sysroot
43958
43959  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43960    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43961  fi
43962
43963          # Skip the Window specific parts
43964        fi
43965
43966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43967$as_echo_n "checking for build platform devkit... " >&6; }
43968        if test "x$BUILD_DEVKIT_NAME" != x; then
43969          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43970$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43971        else
43972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43973$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43974        fi
43975
43976        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43977
43978  if test "x$BUILD_SYSROOT" != "x"; then
43979    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43980      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43981        # Solaris Studio does not have a concept of sysroot. Instead we must
43982        # make sure the default include and lib dirs are appended to each
43983        # compile and link command line. Must also add -I-xbuiltin to enable
43984        # inlining of system functions and intrinsics.
43985        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43986        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43987            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
43988      fi
43989    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43990      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43991      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43992    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43993      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43994      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43995    fi
43996    # Propagate the sysroot args to hotspot
43997    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43998    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43999    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44000    # The global CFLAGS and LDFLAGS variables need these for configure to function
44001    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44002    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44003    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44004    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44005  fi
44006
44007  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44008    # We also need -iframework<path>/System/Library/Frameworks
44009    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44010    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44011    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44012    # set this here so it doesn't have to be peppered throughout the forest
44013    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44014    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44015  fi
44016
44017
44018
44019
44020
44021         # Fallback default of just /bin if DEVKIT_PATH is not defined
44022        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44023          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44024        fi
44025        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44026      fi
44027    fi
44028
44029    # FIXME: we should list the discovered compilers as an exclude pattern!
44030    # If we do that, we can do this detection before POST_DETECTION, and still
44031    # find the build compilers in the tools dir, if needed.
44032
44033
44034
44035  # Publish this variable in the help.
44036
44037
44038  if [ -z "${BUILD_CC+x}" ]; then
44039    # The variable is not set by user, try to locate tool using the code snippet
44040    for ac_prog in cl cc gcc
44041do
44042  # Extract the first word of "$ac_prog", so it can be a program name with args.
44043set dummy $ac_prog; ac_word=$2
44044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44045$as_echo_n "checking for $ac_word... " >&6; }
44046if ${ac_cv_path_BUILD_CC+:} false; then :
44047  $as_echo_n "(cached) " >&6
44048else
44049  case $BUILD_CC in
44050  [\\/]* | ?:[\\/]*)
44051  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44052  ;;
44053  *)
44054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44055for as_dir in $PATH
44056do
44057  IFS=$as_save_IFS
44058  test -z "$as_dir" && as_dir=.
44059    for ac_exec_ext in '' $ac_executable_extensions; do
44060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44061    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44063    break 2
44064  fi
44065done
44066  done
44067IFS=$as_save_IFS
44068
44069  ;;
44070esac
44071fi
44072BUILD_CC=$ac_cv_path_BUILD_CC
44073if test -n "$BUILD_CC"; then
44074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44075$as_echo "$BUILD_CC" >&6; }
44076else
44077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44078$as_echo "no" >&6; }
44079fi
44080
44081
44082  test -n "$BUILD_CC" && break
44083done
44084
44085  else
44086    # The variable is set, but is it from the command line or the environment?
44087
44088    # Try to remove the string !BUILD_CC! from our list.
44089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44091      # If it failed, the variable was not from the command line. Ignore it,
44092      # but warn the user (except for BASH, which is always set by the calling BASH).
44093      if test "xBUILD_CC" != xBASH; then
44094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44095$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44096      fi
44097      # Try to locate tool using the code snippet
44098      for ac_prog in cl cc gcc
44099do
44100  # Extract the first word of "$ac_prog", so it can be a program name with args.
44101set dummy $ac_prog; ac_word=$2
44102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44103$as_echo_n "checking for $ac_word... " >&6; }
44104if ${ac_cv_path_BUILD_CC+:} false; then :
44105  $as_echo_n "(cached) " >&6
44106else
44107  case $BUILD_CC in
44108  [\\/]* | ?:[\\/]*)
44109  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44110  ;;
44111  *)
44112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44113for as_dir in $PATH
44114do
44115  IFS=$as_save_IFS
44116  test -z "$as_dir" && as_dir=.
44117    for ac_exec_ext in '' $ac_executable_extensions; do
44118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44119    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44121    break 2
44122  fi
44123done
44124  done
44125IFS=$as_save_IFS
44126
44127  ;;
44128esac
44129fi
44130BUILD_CC=$ac_cv_path_BUILD_CC
44131if test -n "$BUILD_CC"; then
44132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44133$as_echo "$BUILD_CC" >&6; }
44134else
44135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44136$as_echo "no" >&6; }
44137fi
44138
44139
44140  test -n "$BUILD_CC" && break
44141done
44142
44143    else
44144      # If it succeeded, then it was overridden by the user. We will use it
44145      # for the tool.
44146
44147      # First remove it from the list of overridden variables, so we can test
44148      # for unknown variables in the end.
44149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44150
44151      # Check if we try to supply an empty value
44152      if test "x$BUILD_CC" = x; then
44153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44154$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44156$as_echo_n "checking for BUILD_CC... " >&6; }
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44158$as_echo "disabled" >&6; }
44159      else
44160        # Check if the provided tool contains a complete path.
44161        tool_specified="$BUILD_CC"
44162        tool_basename="${tool_specified##*/}"
44163        if test "x$tool_basename" = "x$tool_specified"; then
44164          # A command without a complete path is provided, search $PATH.
44165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44166$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44167          # Extract the first word of "$tool_basename", so it can be a program name with args.
44168set dummy $tool_basename; ac_word=$2
44169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44170$as_echo_n "checking for $ac_word... " >&6; }
44171if ${ac_cv_path_BUILD_CC+:} false; then :
44172  $as_echo_n "(cached) " >&6
44173else
44174  case $BUILD_CC in
44175  [\\/]* | ?:[\\/]*)
44176  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44177  ;;
44178  *)
44179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44180for as_dir in $PATH
44181do
44182  IFS=$as_save_IFS
44183  test -z "$as_dir" && as_dir=.
44184    for ac_exec_ext in '' $ac_executable_extensions; do
44185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44186    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44188    break 2
44189  fi
44190done
44191  done
44192IFS=$as_save_IFS
44193
44194  ;;
44195esac
44196fi
44197BUILD_CC=$ac_cv_path_BUILD_CC
44198if test -n "$BUILD_CC"; then
44199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44200$as_echo "$BUILD_CC" >&6; }
44201else
44202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44203$as_echo "no" >&6; }
44204fi
44205
44206
44207          if test "x$BUILD_CC" = x; then
44208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44209          fi
44210        else
44211          # Otherwise we believe it is a complete path. Use it as it is.
44212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44213$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44215$as_echo_n "checking for BUILD_CC... " >&6; }
44216          if test ! -x "$tool_specified"; then
44217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44218$as_echo "not found" >&6; }
44219            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44220          fi
44221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44222$as_echo "$tool_specified" >&6; }
44223        fi
44224      fi
44225    fi
44226
44227  fi
44228
44229
44230
44231  if test "x$BUILD_CC" = x; then
44232    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44233  fi
44234
44235
44236
44237  # Only process if variable expands to non-empty
44238
44239  if test "x$BUILD_CC" != x; then
44240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44241
44242  # First separate the path from the arguments. This will split at the first
44243  # space.
44244  complete="$BUILD_CC"
44245  path="${complete%% *}"
44246  tmp="$complete EOL"
44247  arguments="${tmp#* }"
44248
44249  # Input might be given as Windows format, start by converting to
44250  # unix format.
44251  new_path=`$CYGPATH -u "$path"`
44252
44253  # Now try to locate executable using which
44254  new_path=`$WHICH "$new_path" 2> /dev/null`
44255  # bat and cmd files are not always considered executable in cygwin causing which
44256  # to not find them
44257  if test "x$new_path" = x \
44258      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44259      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44260    new_path=`$CYGPATH -u "$path"`
44261  fi
44262  if test "x$new_path" = x; then
44263    # Oops. Which didn't find the executable.
44264    # The splitting of arguments from the executable at a space might have been incorrect,
44265    # since paths with space are more likely in Windows. Give it another try with the whole
44266    # argument.
44267    path="$complete"
44268    arguments="EOL"
44269    new_path=`$CYGPATH -u "$path"`
44270    new_path=`$WHICH "$new_path" 2> /dev/null`
44271    # bat and cmd files are not always considered executable in cygwin causing which
44272    # to not find them
44273    if test "x$new_path" = x \
44274        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44275        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44276      new_path=`$CYGPATH -u "$path"`
44277    fi
44278    if test "x$new_path" = x; then
44279      # It's still not found. Now this is an unrecoverable error.
44280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44281$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44282      has_space=`$ECHO "$complete" | $GREP " "`
44283      if test "x$has_space" != x; then
44284        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44285$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44286      fi
44287      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44288    fi
44289  fi
44290
44291  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44292  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44293  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44294  # "foo.exe" is OK but "foo" is an error.
44295  #
44296  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44297  # It is also a way to make sure we got the proper file name for the real test later on.
44298  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44299  if test "x$test_shortpath" = x; then
44300    # Short path failed, file does not exist as specified.
44301    # Try adding .exe or .cmd
44302    if test -f "${new_path}.exe"; then
44303      input_to_shortpath="${new_path}.exe"
44304    elif test -f "${new_path}.cmd"; then
44305      input_to_shortpath="${new_path}.cmd"
44306    else
44307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44308$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44310$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44311      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44312    fi
44313  else
44314    input_to_shortpath="$new_path"
44315  fi
44316
44317  # Call helper function which possibly converts this using DOS-style short mode.
44318  # If so, the updated path is stored in $new_path.
44319  new_path="$input_to_shortpath"
44320
44321  input_path="$input_to_shortpath"
44322  # Check if we need to convert this using DOS-style short mode. If the path
44323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44324  # take no chances and rewrite it.
44325  # Note: m4 eats our [], so we need to use [ and ] instead.
44326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44327  if test "x$has_forbidden_chars" != x; then
44328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44332      # Going to short mode and back again did indeed matter. Since short mode is
44333      # case insensitive, let's make it lowercase to improve readability.
44334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44335      # Now convert it back to Unix-style (cygpath)
44336      input_path=`$CYGPATH -u "$shortmode_path"`
44337      new_path="$input_path"
44338    fi
44339  fi
44340
44341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44342  if test "x$test_cygdrive_prefix" = x; then
44343    # As a simple fix, exclude /usr/bin since it's not a real path.
44344    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44346      # a path prefixed by /cygdrive for fixpath to work.
44347      new_path="$CYGWIN_ROOT_PATH$input_path"
44348    fi
44349  fi
44350
44351  # remove trailing .exe if any
44352  new_path="${new_path/%.exe/}"
44353
44354    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44355
44356  # First separate the path from the arguments. This will split at the first
44357  # space.
44358  complete="$BUILD_CC"
44359  path="${complete%% *}"
44360  tmp="$complete EOL"
44361  arguments="${tmp#* }"
44362
44363  # Input might be given as Windows format, start by converting to
44364  # unix format.
44365  new_path="$path"
44366
44367  windows_path="$new_path"
44368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44369    unix_path=`$CYGPATH -u "$windows_path"`
44370    new_path="$unix_path"
44371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44373    new_path="$unix_path"
44374  fi
44375
44376
44377  # Now try to locate executable using which
44378  new_path=`$WHICH "$new_path" 2> /dev/null`
44379
44380  if test "x$new_path" = x; then
44381    # Oops. Which didn't find the executable.
44382    # The splitting of arguments from the executable at a space might have been incorrect,
44383    # since paths with space are more likely in Windows. Give it another try with the whole
44384    # argument.
44385    path="$complete"
44386    arguments="EOL"
44387    new_path="$path"
44388
44389  windows_path="$new_path"
44390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44391    unix_path=`$CYGPATH -u "$windows_path"`
44392    new_path="$unix_path"
44393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44395    new_path="$unix_path"
44396  fi
44397
44398
44399    new_path=`$WHICH "$new_path" 2> /dev/null`
44400    # bat and cmd files are not always considered executable in MSYS causing which
44401    # to not find them
44402    if test "x$new_path" = x \
44403        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44404        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44405      new_path="$path"
44406
44407  windows_path="$new_path"
44408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44409    unix_path=`$CYGPATH -u "$windows_path"`
44410    new_path="$unix_path"
44411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44413    new_path="$unix_path"
44414  fi
44415
44416    fi
44417
44418    if test "x$new_path" = x; then
44419      # It's still not found. Now this is an unrecoverable error.
44420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44421$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44422      has_space=`$ECHO "$complete" | $GREP " "`
44423      if test "x$has_space" != x; then
44424        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44425$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44426      fi
44427      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44428    fi
44429  fi
44430
44431  # Now new_path has a complete unix path to the binary
44432  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44433    # Keep paths in /bin as-is, but remove trailing .exe if any
44434    new_path="${new_path/%.exe/}"
44435    # Do not save /bin paths to all_fixpath_prefixes!
44436  else
44437    # Not in mixed or Windows style, start by that.
44438    new_path=`cmd //c echo $new_path`
44439
44440  input_path="$new_path"
44441  # Check if we need to convert this using DOS-style short mode. If the path
44442  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44443  # take no chances and rewrite it.
44444  # Note: m4 eats our [], so we need to use [ and ] instead.
44445  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44446  if test "x$has_forbidden_chars" != x; then
44447    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44448    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44449  fi
44450
44451    # Output is in $new_path
44452
44453  windows_path="$new_path"
44454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44455    unix_path=`$CYGPATH -u "$windows_path"`
44456    new_path="$unix_path"
44457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44459    new_path="$unix_path"
44460  fi
44461
44462    # remove trailing .exe if any
44463    new_path="${new_path/%.exe/}"
44464
44465    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44466    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44467  fi
44468
44469    else
44470      # We're on a unix platform. Hooray! :)
44471      # First separate the path from the arguments. This will split at the first
44472      # space.
44473      complete="$BUILD_CC"
44474      path="${complete%% *}"
44475      tmp="$complete EOL"
44476      arguments="${tmp#* }"
44477
44478      # Cannot rely on the command "which" here since it doesn't always work.
44479      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44480      if test -z "$is_absolute_path"; then
44481        # Path to executable is not absolute. Find it.
44482        IFS_save="$IFS"
44483        IFS=:
44484        for p in $PATH; do
44485          if test -f "$p/$path" && test -x "$p/$path"; then
44486            new_path="$p/$path"
44487            break
44488          fi
44489        done
44490        IFS="$IFS_save"
44491      else
44492        # This is an absolute path, we can use it without further modifications.
44493        new_path="$path"
44494      fi
44495
44496      if test "x$new_path" = x; then
44497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44498$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44499        has_space=`$ECHO "$complete" | $GREP " "`
44500        if test "x$has_space" != x; then
44501          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44502$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44503        fi
44504        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44505      fi
44506    fi
44507
44508    # Now join together the path and the arguments once again
44509    if test "x$arguments" != xEOL; then
44510      new_complete="$new_path ${arguments% *}"
44511    else
44512      new_complete="$new_path"
44513    fi
44514
44515    if test "x$complete" != "x$new_complete"; then
44516      BUILD_CC="$new_complete"
44517      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44518$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44519    fi
44520  fi
44521
44522
44523
44524
44525  # Publish this variable in the help.
44526
44527
44528  if [ -z "${BUILD_CXX+x}" ]; then
44529    # The variable is not set by user, try to locate tool using the code snippet
44530    for ac_prog in cl CC g++
44531do
44532  # Extract the first word of "$ac_prog", so it can be a program name with args.
44533set dummy $ac_prog; ac_word=$2
44534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44535$as_echo_n "checking for $ac_word... " >&6; }
44536if ${ac_cv_path_BUILD_CXX+:} false; then :
44537  $as_echo_n "(cached) " >&6
44538else
44539  case $BUILD_CXX in
44540  [\\/]* | ?:[\\/]*)
44541  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44542  ;;
44543  *)
44544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44545for as_dir in $PATH
44546do
44547  IFS=$as_save_IFS
44548  test -z "$as_dir" && as_dir=.
44549    for ac_exec_ext in '' $ac_executable_extensions; do
44550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44551    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44553    break 2
44554  fi
44555done
44556  done
44557IFS=$as_save_IFS
44558
44559  ;;
44560esac
44561fi
44562BUILD_CXX=$ac_cv_path_BUILD_CXX
44563if test -n "$BUILD_CXX"; then
44564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44565$as_echo "$BUILD_CXX" >&6; }
44566else
44567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44568$as_echo "no" >&6; }
44569fi
44570
44571
44572  test -n "$BUILD_CXX" && break
44573done
44574
44575  else
44576    # The variable is set, but is it from the command line or the environment?
44577
44578    # Try to remove the string !BUILD_CXX! from our list.
44579    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44580    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44581      # If it failed, the variable was not from the command line. Ignore it,
44582      # but warn the user (except for BASH, which is always set by the calling BASH).
44583      if test "xBUILD_CXX" != xBASH; then
44584        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44585$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44586      fi
44587      # Try to locate tool using the code snippet
44588      for ac_prog in cl CC g++
44589do
44590  # Extract the first word of "$ac_prog", so it can be a program name with args.
44591set dummy $ac_prog; ac_word=$2
44592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44593$as_echo_n "checking for $ac_word... " >&6; }
44594if ${ac_cv_path_BUILD_CXX+:} false; then :
44595  $as_echo_n "(cached) " >&6
44596else
44597  case $BUILD_CXX in
44598  [\\/]* | ?:[\\/]*)
44599  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44600  ;;
44601  *)
44602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44603for as_dir in $PATH
44604do
44605  IFS=$as_save_IFS
44606  test -z "$as_dir" && as_dir=.
44607    for ac_exec_ext in '' $ac_executable_extensions; do
44608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44609    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44611    break 2
44612  fi
44613done
44614  done
44615IFS=$as_save_IFS
44616
44617  ;;
44618esac
44619fi
44620BUILD_CXX=$ac_cv_path_BUILD_CXX
44621if test -n "$BUILD_CXX"; then
44622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44623$as_echo "$BUILD_CXX" >&6; }
44624else
44625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44626$as_echo "no" >&6; }
44627fi
44628
44629
44630  test -n "$BUILD_CXX" && break
44631done
44632
44633    else
44634      # If it succeeded, then it was overridden by the user. We will use it
44635      # for the tool.
44636
44637      # First remove it from the list of overridden variables, so we can test
44638      # for unknown variables in the end.
44639      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44640
44641      # Check if we try to supply an empty value
44642      if test "x$BUILD_CXX" = x; then
44643        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44644$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44645        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44646$as_echo_n "checking for BUILD_CXX... " >&6; }
44647        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44648$as_echo "disabled" >&6; }
44649      else
44650        # Check if the provided tool contains a complete path.
44651        tool_specified="$BUILD_CXX"
44652        tool_basename="${tool_specified##*/}"
44653        if test "x$tool_basename" = "x$tool_specified"; then
44654          # A command without a complete path is provided, search $PATH.
44655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44656$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44657          # Extract the first word of "$tool_basename", so it can be a program name with args.
44658set dummy $tool_basename; ac_word=$2
44659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44660$as_echo_n "checking for $ac_word... " >&6; }
44661if ${ac_cv_path_BUILD_CXX+:} false; then :
44662  $as_echo_n "(cached) " >&6
44663else
44664  case $BUILD_CXX in
44665  [\\/]* | ?:[\\/]*)
44666  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44667  ;;
44668  *)
44669  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44670for as_dir in $PATH
44671do
44672  IFS=$as_save_IFS
44673  test -z "$as_dir" && as_dir=.
44674    for ac_exec_ext in '' $ac_executable_extensions; do
44675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44676    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44678    break 2
44679  fi
44680done
44681  done
44682IFS=$as_save_IFS
44683
44684  ;;
44685esac
44686fi
44687BUILD_CXX=$ac_cv_path_BUILD_CXX
44688if test -n "$BUILD_CXX"; then
44689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44690$as_echo "$BUILD_CXX" >&6; }
44691else
44692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44693$as_echo "no" >&6; }
44694fi
44695
44696
44697          if test "x$BUILD_CXX" = x; then
44698            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44699          fi
44700        else
44701          # Otherwise we believe it is a complete path. Use it as it is.
44702          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44703$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44704          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44705$as_echo_n "checking for BUILD_CXX... " >&6; }
44706          if test ! -x "$tool_specified"; then
44707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44708$as_echo "not found" >&6; }
44709            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44710          fi
44711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44712$as_echo "$tool_specified" >&6; }
44713        fi
44714      fi
44715    fi
44716
44717  fi
44718
44719
44720
44721  if test "x$BUILD_CXX" = x; then
44722    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44723  fi
44724
44725
44726
44727  # Only process if variable expands to non-empty
44728
44729  if test "x$BUILD_CXX" != x; then
44730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44731
44732  # First separate the path from the arguments. This will split at the first
44733  # space.
44734  complete="$BUILD_CXX"
44735  path="${complete%% *}"
44736  tmp="$complete EOL"
44737  arguments="${tmp#* }"
44738
44739  # Input might be given as Windows format, start by converting to
44740  # unix format.
44741  new_path=`$CYGPATH -u "$path"`
44742
44743  # Now try to locate executable using which
44744  new_path=`$WHICH "$new_path" 2> /dev/null`
44745  # bat and cmd files are not always considered executable in cygwin causing which
44746  # to not find them
44747  if test "x$new_path" = x \
44748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44750    new_path=`$CYGPATH -u "$path"`
44751  fi
44752  if test "x$new_path" = x; then
44753    # Oops. Which didn't find the executable.
44754    # The splitting of arguments from the executable at a space might have been incorrect,
44755    # since paths with space are more likely in Windows. Give it another try with the whole
44756    # argument.
44757    path="$complete"
44758    arguments="EOL"
44759    new_path=`$CYGPATH -u "$path"`
44760    new_path=`$WHICH "$new_path" 2> /dev/null`
44761    # bat and cmd files are not always considered executable in cygwin causing which
44762    # to not find them
44763    if test "x$new_path" = x \
44764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44766      new_path=`$CYGPATH -u "$path"`
44767    fi
44768    if test "x$new_path" = x; then
44769      # It's still not found. Now this is an unrecoverable error.
44770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44771$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44772      has_space=`$ECHO "$complete" | $GREP " "`
44773      if test "x$has_space" != x; then
44774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44776      fi
44777      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44778    fi
44779  fi
44780
44781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44784  # "foo.exe" is OK but "foo" is an error.
44785  #
44786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44787  # It is also a way to make sure we got the proper file name for the real test later on.
44788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44789  if test "x$test_shortpath" = x; then
44790    # Short path failed, file does not exist as specified.
44791    # Try adding .exe or .cmd
44792    if test -f "${new_path}.exe"; then
44793      input_to_shortpath="${new_path}.exe"
44794    elif test -f "${new_path}.cmd"; then
44795      input_to_shortpath="${new_path}.cmd"
44796    else
44797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44798$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44801      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44802    fi
44803  else
44804    input_to_shortpath="$new_path"
44805  fi
44806
44807  # Call helper function which possibly converts this using DOS-style short mode.
44808  # If so, the updated path is stored in $new_path.
44809  new_path="$input_to_shortpath"
44810
44811  input_path="$input_to_shortpath"
44812  # Check if we need to convert this using DOS-style short mode. If the path
44813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44814  # take no chances and rewrite it.
44815  # Note: m4 eats our [], so we need to use [ and ] instead.
44816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44817  if test "x$has_forbidden_chars" != x; then
44818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44822      # Going to short mode and back again did indeed matter. Since short mode is
44823      # case insensitive, let's make it lowercase to improve readability.
44824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44825      # Now convert it back to Unix-style (cygpath)
44826      input_path=`$CYGPATH -u "$shortmode_path"`
44827      new_path="$input_path"
44828    fi
44829  fi
44830
44831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44832  if test "x$test_cygdrive_prefix" = x; then
44833    # As a simple fix, exclude /usr/bin since it's not a real path.
44834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44836      # a path prefixed by /cygdrive for fixpath to work.
44837      new_path="$CYGWIN_ROOT_PATH$input_path"
44838    fi
44839  fi
44840
44841  # remove trailing .exe if any
44842  new_path="${new_path/%.exe/}"
44843
44844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44845
44846  # First separate the path from the arguments. This will split at the first
44847  # space.
44848  complete="$BUILD_CXX"
44849  path="${complete%% *}"
44850  tmp="$complete EOL"
44851  arguments="${tmp#* }"
44852
44853  # Input might be given as Windows format, start by converting to
44854  # unix format.
44855  new_path="$path"
44856
44857  windows_path="$new_path"
44858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44859    unix_path=`$CYGPATH -u "$windows_path"`
44860    new_path="$unix_path"
44861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44863    new_path="$unix_path"
44864  fi
44865
44866
44867  # Now try to locate executable using which
44868  new_path=`$WHICH "$new_path" 2> /dev/null`
44869
44870  if test "x$new_path" = x; then
44871    # Oops. Which didn't find the executable.
44872    # The splitting of arguments from the executable at a space might have been incorrect,
44873    # since paths with space are more likely in Windows. Give it another try with the whole
44874    # argument.
44875    path="$complete"
44876    arguments="EOL"
44877    new_path="$path"
44878
44879  windows_path="$new_path"
44880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881    unix_path=`$CYGPATH -u "$windows_path"`
44882    new_path="$unix_path"
44883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44885    new_path="$unix_path"
44886  fi
44887
44888
44889    new_path=`$WHICH "$new_path" 2> /dev/null`
44890    # bat and cmd files are not always considered executable in MSYS causing which
44891    # to not find them
44892    if test "x$new_path" = x \
44893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44895      new_path="$path"
44896
44897  windows_path="$new_path"
44898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44899    unix_path=`$CYGPATH -u "$windows_path"`
44900    new_path="$unix_path"
44901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44903    new_path="$unix_path"
44904  fi
44905
44906    fi
44907
44908    if test "x$new_path" = x; then
44909      # It's still not found. Now this is an unrecoverable error.
44910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44911$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44912      has_space=`$ECHO "$complete" | $GREP " "`
44913      if test "x$has_space" != x; then
44914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44916      fi
44917      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44918    fi
44919  fi
44920
44921  # Now new_path has a complete unix path to the binary
44922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44923    # Keep paths in /bin as-is, but remove trailing .exe if any
44924    new_path="${new_path/%.exe/}"
44925    # Do not save /bin paths to all_fixpath_prefixes!
44926  else
44927    # Not in mixed or Windows style, start by that.
44928    new_path=`cmd //c echo $new_path`
44929
44930  input_path="$new_path"
44931  # Check if we need to convert this using DOS-style short mode. If the path
44932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44933  # take no chances and rewrite it.
44934  # Note: m4 eats our [], so we need to use [ and ] instead.
44935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44936  if test "x$has_forbidden_chars" != x; then
44937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44939  fi
44940
44941    # Output is in $new_path
44942
44943  windows_path="$new_path"
44944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44945    unix_path=`$CYGPATH -u "$windows_path"`
44946    new_path="$unix_path"
44947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44949    new_path="$unix_path"
44950  fi
44951
44952    # remove trailing .exe if any
44953    new_path="${new_path/%.exe/}"
44954
44955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44957  fi
44958
44959    else
44960      # We're on a unix platform. Hooray! :)
44961      # First separate the path from the arguments. This will split at the first
44962      # space.
44963      complete="$BUILD_CXX"
44964      path="${complete%% *}"
44965      tmp="$complete EOL"
44966      arguments="${tmp#* }"
44967
44968      # Cannot rely on the command "which" here since it doesn't always work.
44969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44970      if test -z "$is_absolute_path"; then
44971        # Path to executable is not absolute. Find it.
44972        IFS_save="$IFS"
44973        IFS=:
44974        for p in $PATH; do
44975          if test -f "$p/$path" && test -x "$p/$path"; then
44976            new_path="$p/$path"
44977            break
44978          fi
44979        done
44980        IFS="$IFS_save"
44981      else
44982        # This is an absolute path, we can use it without further modifications.
44983        new_path="$path"
44984      fi
44985
44986      if test "x$new_path" = x; then
44987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44988$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44989        has_space=`$ECHO "$complete" | $GREP " "`
44990        if test "x$has_space" != x; then
44991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44993        fi
44994        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44995      fi
44996    fi
44997
44998    # Now join together the path and the arguments once again
44999    if test "x$arguments" != xEOL; then
45000      new_complete="$new_path ${arguments% *}"
45001    else
45002      new_complete="$new_path"
45003    fi
45004
45005    if test "x$complete" != "x$new_complete"; then
45006      BUILD_CXX="$new_complete"
45007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45008$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45009    fi
45010  fi
45011
45012
45013
45014  # Publish this variable in the help.
45015
45016
45017  if [ -z "${BUILD_NM+x}" ]; then
45018    # The variable is not set by user, try to locate tool using the code snippet
45019    for ac_prog in nm gcc-nm
45020do
45021  # Extract the first word of "$ac_prog", so it can be a program name with args.
45022set dummy $ac_prog; ac_word=$2
45023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45024$as_echo_n "checking for $ac_word... " >&6; }
45025if ${ac_cv_path_BUILD_NM+:} false; then :
45026  $as_echo_n "(cached) " >&6
45027else
45028  case $BUILD_NM in
45029  [\\/]* | ?:[\\/]*)
45030  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45031  ;;
45032  *)
45033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45034for as_dir in $PATH
45035do
45036  IFS=$as_save_IFS
45037  test -z "$as_dir" && as_dir=.
45038    for ac_exec_ext in '' $ac_executable_extensions; do
45039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45040    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45042    break 2
45043  fi
45044done
45045  done
45046IFS=$as_save_IFS
45047
45048  ;;
45049esac
45050fi
45051BUILD_NM=$ac_cv_path_BUILD_NM
45052if test -n "$BUILD_NM"; then
45053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45054$as_echo "$BUILD_NM" >&6; }
45055else
45056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45057$as_echo "no" >&6; }
45058fi
45059
45060
45061  test -n "$BUILD_NM" && break
45062done
45063
45064  else
45065    # The variable is set, but is it from the command line or the environment?
45066
45067    # Try to remove the string !BUILD_NM! from our list.
45068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45070      # If it failed, the variable was not from the command line. Ignore it,
45071      # but warn the user (except for BASH, which is always set by the calling BASH).
45072      if test "xBUILD_NM" != xBASH; then
45073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45074$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45075      fi
45076      # Try to locate tool using the code snippet
45077      for ac_prog in nm gcc-nm
45078do
45079  # Extract the first word of "$ac_prog", so it can be a program name with args.
45080set dummy $ac_prog; ac_word=$2
45081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45082$as_echo_n "checking for $ac_word... " >&6; }
45083if ${ac_cv_path_BUILD_NM+:} false; then :
45084  $as_echo_n "(cached) " >&6
45085else
45086  case $BUILD_NM in
45087  [\\/]* | ?:[\\/]*)
45088  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45089  ;;
45090  *)
45091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45092for as_dir in $PATH
45093do
45094  IFS=$as_save_IFS
45095  test -z "$as_dir" && as_dir=.
45096    for ac_exec_ext in '' $ac_executable_extensions; do
45097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45098    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45100    break 2
45101  fi
45102done
45103  done
45104IFS=$as_save_IFS
45105
45106  ;;
45107esac
45108fi
45109BUILD_NM=$ac_cv_path_BUILD_NM
45110if test -n "$BUILD_NM"; then
45111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45112$as_echo "$BUILD_NM" >&6; }
45113else
45114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45115$as_echo "no" >&6; }
45116fi
45117
45118
45119  test -n "$BUILD_NM" && break
45120done
45121
45122    else
45123      # If it succeeded, then it was overridden by the user. We will use it
45124      # for the tool.
45125
45126      # First remove it from the list of overridden variables, so we can test
45127      # for unknown variables in the end.
45128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45129
45130      # Check if we try to supply an empty value
45131      if test "x$BUILD_NM" = x; then
45132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45133$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45135$as_echo_n "checking for BUILD_NM... " >&6; }
45136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45137$as_echo "disabled" >&6; }
45138      else
45139        # Check if the provided tool contains a complete path.
45140        tool_specified="$BUILD_NM"
45141        tool_basename="${tool_specified##*/}"
45142        if test "x$tool_basename" = "x$tool_specified"; then
45143          # A command without a complete path is provided, search $PATH.
45144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45145$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45146          # Extract the first word of "$tool_basename", so it can be a program name with args.
45147set dummy $tool_basename; ac_word=$2
45148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45149$as_echo_n "checking for $ac_word... " >&6; }
45150if ${ac_cv_path_BUILD_NM+:} false; then :
45151  $as_echo_n "(cached) " >&6
45152else
45153  case $BUILD_NM in
45154  [\\/]* | ?:[\\/]*)
45155  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45156  ;;
45157  *)
45158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45159for as_dir in $PATH
45160do
45161  IFS=$as_save_IFS
45162  test -z "$as_dir" && as_dir=.
45163    for ac_exec_ext in '' $ac_executable_extensions; do
45164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45165    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45167    break 2
45168  fi
45169done
45170  done
45171IFS=$as_save_IFS
45172
45173  ;;
45174esac
45175fi
45176BUILD_NM=$ac_cv_path_BUILD_NM
45177if test -n "$BUILD_NM"; then
45178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45179$as_echo "$BUILD_NM" >&6; }
45180else
45181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45182$as_echo "no" >&6; }
45183fi
45184
45185
45186          if test "x$BUILD_NM" = x; then
45187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45188          fi
45189        else
45190          # Otherwise we believe it is a complete path. Use it as it is.
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45192$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45194$as_echo_n "checking for BUILD_NM... " >&6; }
45195          if test ! -x "$tool_specified"; then
45196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45197$as_echo "not found" >&6; }
45198            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45199          fi
45200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45201$as_echo "$tool_specified" >&6; }
45202        fi
45203      fi
45204    fi
45205
45206  fi
45207
45208
45209
45210  # Only process if variable expands to non-empty
45211
45212  if test "x$BUILD_NM" != x; then
45213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45214
45215  # First separate the path from the arguments. This will split at the first
45216  # space.
45217  complete="$BUILD_NM"
45218  path="${complete%% *}"
45219  tmp="$complete EOL"
45220  arguments="${tmp#* }"
45221
45222  # Input might be given as Windows format, start by converting to
45223  # unix format.
45224  new_path=`$CYGPATH -u "$path"`
45225
45226  # Now try to locate executable using which
45227  new_path=`$WHICH "$new_path" 2> /dev/null`
45228  # bat and cmd files are not always considered executable in cygwin causing which
45229  # to not find them
45230  if test "x$new_path" = x \
45231      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45232      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45233    new_path=`$CYGPATH -u "$path"`
45234  fi
45235  if test "x$new_path" = x; then
45236    # Oops. Which didn't find the executable.
45237    # The splitting of arguments from the executable at a space might have been incorrect,
45238    # since paths with space are more likely in Windows. Give it another try with the whole
45239    # argument.
45240    path="$complete"
45241    arguments="EOL"
45242    new_path=`$CYGPATH -u "$path"`
45243    new_path=`$WHICH "$new_path" 2> /dev/null`
45244    # bat and cmd files are not always considered executable in cygwin causing which
45245    # to not find them
45246    if test "x$new_path" = x \
45247        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45248        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45249      new_path=`$CYGPATH -u "$path"`
45250    fi
45251    if test "x$new_path" = x; then
45252      # It's still not found. Now this is an unrecoverable error.
45253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45254$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45255      has_space=`$ECHO "$complete" | $GREP " "`
45256      if test "x$has_space" != x; then
45257        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45258$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45259      fi
45260      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45261    fi
45262  fi
45263
45264  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45265  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45266  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45267  # "foo.exe" is OK but "foo" is an error.
45268  #
45269  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45270  # It is also a way to make sure we got the proper file name for the real test later on.
45271  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45272  if test "x$test_shortpath" = x; then
45273    # Short path failed, file does not exist as specified.
45274    # Try adding .exe or .cmd
45275    if test -f "${new_path}.exe"; then
45276      input_to_shortpath="${new_path}.exe"
45277    elif test -f "${new_path}.cmd"; then
45278      input_to_shortpath="${new_path}.cmd"
45279    else
45280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45281$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45282      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45283$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45284      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45285    fi
45286  else
45287    input_to_shortpath="$new_path"
45288  fi
45289
45290  # Call helper function which possibly converts this using DOS-style short mode.
45291  # If so, the updated path is stored in $new_path.
45292  new_path="$input_to_shortpath"
45293
45294  input_path="$input_to_shortpath"
45295  # Check if we need to convert this using DOS-style short mode. If the path
45296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45297  # take no chances and rewrite it.
45298  # Note: m4 eats our [], so we need to use [ and ] instead.
45299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45300  if test "x$has_forbidden_chars" != x; then
45301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45302    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45303    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45304    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45305      # Going to short mode and back again did indeed matter. Since short mode is
45306      # case insensitive, let's make it lowercase to improve readability.
45307      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45308      # Now convert it back to Unix-style (cygpath)
45309      input_path=`$CYGPATH -u "$shortmode_path"`
45310      new_path="$input_path"
45311    fi
45312  fi
45313
45314  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45315  if test "x$test_cygdrive_prefix" = x; then
45316    # As a simple fix, exclude /usr/bin since it's not a real path.
45317    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45318      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45319      # a path prefixed by /cygdrive for fixpath to work.
45320      new_path="$CYGWIN_ROOT_PATH$input_path"
45321    fi
45322  fi
45323
45324  # remove trailing .exe if any
45325  new_path="${new_path/%.exe/}"
45326
45327    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45328
45329  # First separate the path from the arguments. This will split at the first
45330  # space.
45331  complete="$BUILD_NM"
45332  path="${complete%% *}"
45333  tmp="$complete EOL"
45334  arguments="${tmp#* }"
45335
45336  # Input might be given as Windows format, start by converting to
45337  # unix format.
45338  new_path="$path"
45339
45340  windows_path="$new_path"
45341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45342    unix_path=`$CYGPATH -u "$windows_path"`
45343    new_path="$unix_path"
45344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45346    new_path="$unix_path"
45347  fi
45348
45349
45350  # Now try to locate executable using which
45351  new_path=`$WHICH "$new_path" 2> /dev/null`
45352
45353  if test "x$new_path" = x; then
45354    # Oops. Which didn't find the executable.
45355    # The splitting of arguments from the executable at a space might have been incorrect,
45356    # since paths with space are more likely in Windows. Give it another try with the whole
45357    # argument.
45358    path="$complete"
45359    arguments="EOL"
45360    new_path="$path"
45361
45362  windows_path="$new_path"
45363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45364    unix_path=`$CYGPATH -u "$windows_path"`
45365    new_path="$unix_path"
45366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45368    new_path="$unix_path"
45369  fi
45370
45371
45372    new_path=`$WHICH "$new_path" 2> /dev/null`
45373    # bat and cmd files are not always considered executable in MSYS causing which
45374    # to not find them
45375    if test "x$new_path" = x \
45376        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45377        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45378      new_path="$path"
45379
45380  windows_path="$new_path"
45381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45382    unix_path=`$CYGPATH -u "$windows_path"`
45383    new_path="$unix_path"
45384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45386    new_path="$unix_path"
45387  fi
45388
45389    fi
45390
45391    if test "x$new_path" = x; then
45392      # It's still not found. Now this is an unrecoverable error.
45393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45394$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45395      has_space=`$ECHO "$complete" | $GREP " "`
45396      if test "x$has_space" != x; then
45397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45399      fi
45400      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45401    fi
45402  fi
45403
45404  # Now new_path has a complete unix path to the binary
45405  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45406    # Keep paths in /bin as-is, but remove trailing .exe if any
45407    new_path="${new_path/%.exe/}"
45408    # Do not save /bin paths to all_fixpath_prefixes!
45409  else
45410    # Not in mixed or Windows style, start by that.
45411    new_path=`cmd //c echo $new_path`
45412
45413  input_path="$new_path"
45414  # Check if we need to convert this using DOS-style short mode. If the path
45415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45416  # take no chances and rewrite it.
45417  # Note: m4 eats our [], so we need to use [ and ] instead.
45418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45419  if test "x$has_forbidden_chars" != x; then
45420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45422  fi
45423
45424    # Output is in $new_path
45425
45426  windows_path="$new_path"
45427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45428    unix_path=`$CYGPATH -u "$windows_path"`
45429    new_path="$unix_path"
45430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45432    new_path="$unix_path"
45433  fi
45434
45435    # remove trailing .exe if any
45436    new_path="${new_path/%.exe/}"
45437
45438    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45439    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45440  fi
45441
45442    else
45443      # We're on a unix platform. Hooray! :)
45444      # First separate the path from the arguments. This will split at the first
45445      # space.
45446      complete="$BUILD_NM"
45447      path="${complete%% *}"
45448      tmp="$complete EOL"
45449      arguments="${tmp#* }"
45450
45451      # Cannot rely on the command "which" here since it doesn't always work.
45452      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45453      if test -z "$is_absolute_path"; then
45454        # Path to executable is not absolute. Find it.
45455        IFS_save="$IFS"
45456        IFS=:
45457        for p in $PATH; do
45458          if test -f "$p/$path" && test -x "$p/$path"; then
45459            new_path="$p/$path"
45460            break
45461          fi
45462        done
45463        IFS="$IFS_save"
45464      else
45465        # This is an absolute path, we can use it without further modifications.
45466        new_path="$path"
45467      fi
45468
45469      if test "x$new_path" = x; then
45470        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45471$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45472        has_space=`$ECHO "$complete" | $GREP " "`
45473        if test "x$has_space" != x; then
45474          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45475$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45476        fi
45477        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45478      fi
45479    fi
45480
45481    # Now join together the path and the arguments once again
45482    if test "x$arguments" != xEOL; then
45483      new_complete="$new_path ${arguments% *}"
45484    else
45485      new_complete="$new_path"
45486    fi
45487
45488    if test "x$complete" != "x$new_complete"; then
45489      BUILD_NM="$new_complete"
45490      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45491$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45492    fi
45493  fi
45494
45495
45496
45497  # Publish this variable in the help.
45498
45499
45500  if [ -z "${BUILD_AR+x}" ]; then
45501    # The variable is not set by user, try to locate tool using the code snippet
45502    for ac_prog in ar gcc-ar
45503do
45504  # Extract the first word of "$ac_prog", so it can be a program name with args.
45505set dummy $ac_prog; ac_word=$2
45506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45507$as_echo_n "checking for $ac_word... " >&6; }
45508if ${ac_cv_path_BUILD_AR+:} false; then :
45509  $as_echo_n "(cached) " >&6
45510else
45511  case $BUILD_AR in
45512  [\\/]* | ?:[\\/]*)
45513  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45514  ;;
45515  *)
45516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45517for as_dir in $PATH
45518do
45519  IFS=$as_save_IFS
45520  test -z "$as_dir" && as_dir=.
45521    for ac_exec_ext in '' $ac_executable_extensions; do
45522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45523    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45525    break 2
45526  fi
45527done
45528  done
45529IFS=$as_save_IFS
45530
45531  ;;
45532esac
45533fi
45534BUILD_AR=$ac_cv_path_BUILD_AR
45535if test -n "$BUILD_AR"; then
45536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45537$as_echo "$BUILD_AR" >&6; }
45538else
45539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45540$as_echo "no" >&6; }
45541fi
45542
45543
45544  test -n "$BUILD_AR" && break
45545done
45546
45547  else
45548    # The variable is set, but is it from the command line or the environment?
45549
45550    # Try to remove the string !BUILD_AR! from our list.
45551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45553      # If it failed, the variable was not from the command line. Ignore it,
45554      # but warn the user (except for BASH, which is always set by the calling BASH).
45555      if test "xBUILD_AR" != xBASH; then
45556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45557$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45558      fi
45559      # Try to locate tool using the code snippet
45560      for ac_prog in ar gcc-ar
45561do
45562  # Extract the first word of "$ac_prog", so it can be a program name with args.
45563set dummy $ac_prog; ac_word=$2
45564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45565$as_echo_n "checking for $ac_word... " >&6; }
45566if ${ac_cv_path_BUILD_AR+:} false; then :
45567  $as_echo_n "(cached) " >&6
45568else
45569  case $BUILD_AR in
45570  [\\/]* | ?:[\\/]*)
45571  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45572  ;;
45573  *)
45574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45575for as_dir in $PATH
45576do
45577  IFS=$as_save_IFS
45578  test -z "$as_dir" && as_dir=.
45579    for ac_exec_ext in '' $ac_executable_extensions; do
45580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45581    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45583    break 2
45584  fi
45585done
45586  done
45587IFS=$as_save_IFS
45588
45589  ;;
45590esac
45591fi
45592BUILD_AR=$ac_cv_path_BUILD_AR
45593if test -n "$BUILD_AR"; then
45594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45595$as_echo "$BUILD_AR" >&6; }
45596else
45597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45598$as_echo "no" >&6; }
45599fi
45600
45601
45602  test -n "$BUILD_AR" && break
45603done
45604
45605    else
45606      # If it succeeded, then it was overridden by the user. We will use it
45607      # for the tool.
45608
45609      # First remove it from the list of overridden variables, so we can test
45610      # for unknown variables in the end.
45611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45612
45613      # Check if we try to supply an empty value
45614      if test "x$BUILD_AR" = x; then
45615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45616$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45618$as_echo_n "checking for BUILD_AR... " >&6; }
45619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45620$as_echo "disabled" >&6; }
45621      else
45622        # Check if the provided tool contains a complete path.
45623        tool_specified="$BUILD_AR"
45624        tool_basename="${tool_specified##*/}"
45625        if test "x$tool_basename" = "x$tool_specified"; then
45626          # A command without a complete path is provided, search $PATH.
45627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45628$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45629          # Extract the first word of "$tool_basename", so it can be a program name with args.
45630set dummy $tool_basename; ac_word=$2
45631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45632$as_echo_n "checking for $ac_word... " >&6; }
45633if ${ac_cv_path_BUILD_AR+:} false; then :
45634  $as_echo_n "(cached) " >&6
45635else
45636  case $BUILD_AR in
45637  [\\/]* | ?:[\\/]*)
45638  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45639  ;;
45640  *)
45641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45642for as_dir in $PATH
45643do
45644  IFS=$as_save_IFS
45645  test -z "$as_dir" && as_dir=.
45646    for ac_exec_ext in '' $ac_executable_extensions; do
45647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45648    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45650    break 2
45651  fi
45652done
45653  done
45654IFS=$as_save_IFS
45655
45656  ;;
45657esac
45658fi
45659BUILD_AR=$ac_cv_path_BUILD_AR
45660if test -n "$BUILD_AR"; then
45661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45662$as_echo "$BUILD_AR" >&6; }
45663else
45664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45665$as_echo "no" >&6; }
45666fi
45667
45668
45669          if test "x$BUILD_AR" = x; then
45670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45671          fi
45672        else
45673          # Otherwise we believe it is a complete path. Use it as it is.
45674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45675$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45677$as_echo_n "checking for BUILD_AR... " >&6; }
45678          if test ! -x "$tool_specified"; then
45679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45680$as_echo "not found" >&6; }
45681            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45682          fi
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45684$as_echo "$tool_specified" >&6; }
45685        fi
45686      fi
45687    fi
45688
45689  fi
45690
45691
45692
45693  # Only process if variable expands to non-empty
45694
45695  if test "x$BUILD_AR" != x; then
45696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45697
45698  # First separate the path from the arguments. This will split at the first
45699  # space.
45700  complete="$BUILD_AR"
45701  path="${complete%% *}"
45702  tmp="$complete EOL"
45703  arguments="${tmp#* }"
45704
45705  # Input might be given as Windows format, start by converting to
45706  # unix format.
45707  new_path=`$CYGPATH -u "$path"`
45708
45709  # Now try to locate executable using which
45710  new_path=`$WHICH "$new_path" 2> /dev/null`
45711  # bat and cmd files are not always considered executable in cygwin causing which
45712  # to not find them
45713  if test "x$new_path" = x \
45714      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45715      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45716    new_path=`$CYGPATH -u "$path"`
45717  fi
45718  if test "x$new_path" = x; then
45719    # Oops. Which didn't find the executable.
45720    # The splitting of arguments from the executable at a space might have been incorrect,
45721    # since paths with space are more likely in Windows. Give it another try with the whole
45722    # argument.
45723    path="$complete"
45724    arguments="EOL"
45725    new_path=`$CYGPATH -u "$path"`
45726    new_path=`$WHICH "$new_path" 2> /dev/null`
45727    # bat and cmd files are not always considered executable in cygwin causing which
45728    # to not find them
45729    if test "x$new_path" = x \
45730        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45731        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45732      new_path=`$CYGPATH -u "$path"`
45733    fi
45734    if test "x$new_path" = x; then
45735      # It's still not found. Now this is an unrecoverable error.
45736      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45737$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45738      has_space=`$ECHO "$complete" | $GREP " "`
45739      if test "x$has_space" != x; then
45740        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45741$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45742      fi
45743      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45744    fi
45745  fi
45746
45747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45750  # "foo.exe" is OK but "foo" is an error.
45751  #
45752  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45753  # It is also a way to make sure we got the proper file name for the real test later on.
45754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45755  if test "x$test_shortpath" = x; then
45756    # Short path failed, file does not exist as specified.
45757    # Try adding .exe or .cmd
45758    if test -f "${new_path}.exe"; then
45759      input_to_shortpath="${new_path}.exe"
45760    elif test -f "${new_path}.cmd"; then
45761      input_to_shortpath="${new_path}.cmd"
45762    else
45763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45764$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45766$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45767      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45768    fi
45769  else
45770    input_to_shortpath="$new_path"
45771  fi
45772
45773  # Call helper function which possibly converts this using DOS-style short mode.
45774  # If so, the updated path is stored in $new_path.
45775  new_path="$input_to_shortpath"
45776
45777  input_path="$input_to_shortpath"
45778  # Check if we need to convert this using DOS-style short mode. If the path
45779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45780  # take no chances and rewrite it.
45781  # Note: m4 eats our [], so we need to use [ and ] instead.
45782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45783  if test "x$has_forbidden_chars" != x; then
45784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45788      # Going to short mode and back again did indeed matter. Since short mode is
45789      # case insensitive, let's make it lowercase to improve readability.
45790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45791      # Now convert it back to Unix-style (cygpath)
45792      input_path=`$CYGPATH -u "$shortmode_path"`
45793      new_path="$input_path"
45794    fi
45795  fi
45796
45797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45798  if test "x$test_cygdrive_prefix" = x; then
45799    # As a simple fix, exclude /usr/bin since it's not a real path.
45800    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45802      # a path prefixed by /cygdrive for fixpath to work.
45803      new_path="$CYGWIN_ROOT_PATH$input_path"
45804    fi
45805  fi
45806
45807  # remove trailing .exe if any
45808  new_path="${new_path/%.exe/}"
45809
45810    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45811
45812  # First separate the path from the arguments. This will split at the first
45813  # space.
45814  complete="$BUILD_AR"
45815  path="${complete%% *}"
45816  tmp="$complete EOL"
45817  arguments="${tmp#* }"
45818
45819  # Input might be given as Windows format, start by converting to
45820  # unix format.
45821  new_path="$path"
45822
45823  windows_path="$new_path"
45824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45825    unix_path=`$CYGPATH -u "$windows_path"`
45826    new_path="$unix_path"
45827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45829    new_path="$unix_path"
45830  fi
45831
45832
45833  # Now try to locate executable using which
45834  new_path=`$WHICH "$new_path" 2> /dev/null`
45835
45836  if test "x$new_path" = x; then
45837    # Oops. Which didn't find the executable.
45838    # The splitting of arguments from the executable at a space might have been incorrect,
45839    # since paths with space are more likely in Windows. Give it another try with the whole
45840    # argument.
45841    path="$complete"
45842    arguments="EOL"
45843    new_path="$path"
45844
45845  windows_path="$new_path"
45846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847    unix_path=`$CYGPATH -u "$windows_path"`
45848    new_path="$unix_path"
45849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851    new_path="$unix_path"
45852  fi
45853
45854
45855    new_path=`$WHICH "$new_path" 2> /dev/null`
45856    # bat and cmd files are not always considered executable in MSYS causing which
45857    # to not find them
45858    if test "x$new_path" = x \
45859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45861      new_path="$path"
45862
45863  windows_path="$new_path"
45864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45865    unix_path=`$CYGPATH -u "$windows_path"`
45866    new_path="$unix_path"
45867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45869    new_path="$unix_path"
45870  fi
45871
45872    fi
45873
45874    if test "x$new_path" = x; then
45875      # It's still not found. Now this is an unrecoverable error.
45876      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45877$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45878      has_space=`$ECHO "$complete" | $GREP " "`
45879      if test "x$has_space" != x; then
45880        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45881$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45882      fi
45883      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45884    fi
45885  fi
45886
45887  # Now new_path has a complete unix path to the binary
45888  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45889    # Keep paths in /bin as-is, but remove trailing .exe if any
45890    new_path="${new_path/%.exe/}"
45891    # Do not save /bin paths to all_fixpath_prefixes!
45892  else
45893    # Not in mixed or Windows style, start by that.
45894    new_path=`cmd //c echo $new_path`
45895
45896  input_path="$new_path"
45897  # Check if we need to convert this using DOS-style short mode. If the path
45898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45899  # take no chances and rewrite it.
45900  # Note: m4 eats our [], so we need to use [ and ] instead.
45901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45902  if test "x$has_forbidden_chars" != x; then
45903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45905  fi
45906
45907    # Output is in $new_path
45908
45909  windows_path="$new_path"
45910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45911    unix_path=`$CYGPATH -u "$windows_path"`
45912    new_path="$unix_path"
45913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45915    new_path="$unix_path"
45916  fi
45917
45918    # remove trailing .exe if any
45919    new_path="${new_path/%.exe/}"
45920
45921    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45922    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45923  fi
45924
45925    else
45926      # We're on a unix platform. Hooray! :)
45927      # First separate the path from the arguments. This will split at the first
45928      # space.
45929      complete="$BUILD_AR"
45930      path="${complete%% *}"
45931      tmp="$complete EOL"
45932      arguments="${tmp#* }"
45933
45934      # Cannot rely on the command "which" here since it doesn't always work.
45935      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45936      if test -z "$is_absolute_path"; then
45937        # Path to executable is not absolute. Find it.
45938        IFS_save="$IFS"
45939        IFS=:
45940        for p in $PATH; do
45941          if test -f "$p/$path" && test -x "$p/$path"; then
45942            new_path="$p/$path"
45943            break
45944          fi
45945        done
45946        IFS="$IFS_save"
45947      else
45948        # This is an absolute path, we can use it without further modifications.
45949        new_path="$path"
45950      fi
45951
45952      if test "x$new_path" = x; then
45953        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45954$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45955        has_space=`$ECHO "$complete" | $GREP " "`
45956        if test "x$has_space" != x; then
45957          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45958$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45959        fi
45960        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45961      fi
45962    fi
45963
45964    # Now join together the path and the arguments once again
45965    if test "x$arguments" != xEOL; then
45966      new_complete="$new_path ${arguments% *}"
45967    else
45968      new_complete="$new_path"
45969    fi
45970
45971    if test "x$complete" != "x$new_complete"; then
45972      BUILD_AR="$new_complete"
45973      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45974$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45975    fi
45976  fi
45977
45978
45979
45980  # Publish this variable in the help.
45981
45982
45983  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45984    # The variable is not set by user, try to locate tool using the code snippet
45985    for ac_prog in objcopy
45986do
45987  # Extract the first word of "$ac_prog", so it can be a program name with args.
45988set dummy $ac_prog; ac_word=$2
45989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45990$as_echo_n "checking for $ac_word... " >&6; }
45991if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45992  $as_echo_n "(cached) " >&6
45993else
45994  case $BUILD_OBJCOPY in
45995  [\\/]* | ?:[\\/]*)
45996  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45997  ;;
45998  *)
45999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46000for as_dir in $PATH
46001do
46002  IFS=$as_save_IFS
46003  test -z "$as_dir" && as_dir=.
46004    for ac_exec_ext in '' $ac_executable_extensions; do
46005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46006    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46008    break 2
46009  fi
46010done
46011  done
46012IFS=$as_save_IFS
46013
46014  ;;
46015esac
46016fi
46017BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46018if test -n "$BUILD_OBJCOPY"; then
46019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46020$as_echo "$BUILD_OBJCOPY" >&6; }
46021else
46022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46023$as_echo "no" >&6; }
46024fi
46025
46026
46027  test -n "$BUILD_OBJCOPY" && break
46028done
46029
46030  else
46031    # The variable is set, but is it from the command line or the environment?
46032
46033    # Try to remove the string !BUILD_OBJCOPY! from our list.
46034    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46035    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46036      # If it failed, the variable was not from the command line. Ignore it,
46037      # but warn the user (except for BASH, which is always set by the calling BASH).
46038      if test "xBUILD_OBJCOPY" != xBASH; then
46039        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46040$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46041      fi
46042      # Try to locate tool using the code snippet
46043      for ac_prog in objcopy
46044do
46045  # Extract the first word of "$ac_prog", so it can be a program name with args.
46046set dummy $ac_prog; ac_word=$2
46047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46048$as_echo_n "checking for $ac_word... " >&6; }
46049if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46050  $as_echo_n "(cached) " >&6
46051else
46052  case $BUILD_OBJCOPY in
46053  [\\/]* | ?:[\\/]*)
46054  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46055  ;;
46056  *)
46057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46058for as_dir in $PATH
46059do
46060  IFS=$as_save_IFS
46061  test -z "$as_dir" && as_dir=.
46062    for ac_exec_ext in '' $ac_executable_extensions; do
46063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46064    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46066    break 2
46067  fi
46068done
46069  done
46070IFS=$as_save_IFS
46071
46072  ;;
46073esac
46074fi
46075BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46076if test -n "$BUILD_OBJCOPY"; then
46077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46078$as_echo "$BUILD_OBJCOPY" >&6; }
46079else
46080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46081$as_echo "no" >&6; }
46082fi
46083
46084
46085  test -n "$BUILD_OBJCOPY" && break
46086done
46087
46088    else
46089      # If it succeeded, then it was overridden by the user. We will use it
46090      # for the tool.
46091
46092      # First remove it from the list of overridden variables, so we can test
46093      # for unknown variables in the end.
46094      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46095
46096      # Check if we try to supply an empty value
46097      if test "x$BUILD_OBJCOPY" = x; then
46098        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46099$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46100        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46101$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46103$as_echo "disabled" >&6; }
46104      else
46105        # Check if the provided tool contains a complete path.
46106        tool_specified="$BUILD_OBJCOPY"
46107        tool_basename="${tool_specified##*/}"
46108        if test "x$tool_basename" = "x$tool_specified"; then
46109          # A command without a complete path is provided, search $PATH.
46110          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46111$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46112          # Extract the first word of "$tool_basename", so it can be a program name with args.
46113set dummy $tool_basename; ac_word=$2
46114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46115$as_echo_n "checking for $ac_word... " >&6; }
46116if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46117  $as_echo_n "(cached) " >&6
46118else
46119  case $BUILD_OBJCOPY in
46120  [\\/]* | ?:[\\/]*)
46121  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46122  ;;
46123  *)
46124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46125for as_dir in $PATH
46126do
46127  IFS=$as_save_IFS
46128  test -z "$as_dir" && as_dir=.
46129    for ac_exec_ext in '' $ac_executable_extensions; do
46130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46131    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46133    break 2
46134  fi
46135done
46136  done
46137IFS=$as_save_IFS
46138
46139  ;;
46140esac
46141fi
46142BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46143if test -n "$BUILD_OBJCOPY"; then
46144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46145$as_echo "$BUILD_OBJCOPY" >&6; }
46146else
46147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46148$as_echo "no" >&6; }
46149fi
46150
46151
46152          if test "x$BUILD_OBJCOPY" = x; then
46153            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46154          fi
46155        else
46156          # Otherwise we believe it is a complete path. Use it as it is.
46157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46158$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46159          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46160$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46161          if test ! -x "$tool_specified"; then
46162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46163$as_echo "not found" >&6; }
46164            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46165          fi
46166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46167$as_echo "$tool_specified" >&6; }
46168        fi
46169      fi
46170    fi
46171
46172  fi
46173
46174
46175
46176  # Only process if variable expands to non-empty
46177
46178  if test "x$BUILD_OBJCOPY" != x; then
46179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46180
46181  # First separate the path from the arguments. This will split at the first
46182  # space.
46183  complete="$BUILD_OBJCOPY"
46184  path="${complete%% *}"
46185  tmp="$complete EOL"
46186  arguments="${tmp#* }"
46187
46188  # Input might be given as Windows format, start by converting to
46189  # unix format.
46190  new_path=`$CYGPATH -u "$path"`
46191
46192  # Now try to locate executable using which
46193  new_path=`$WHICH "$new_path" 2> /dev/null`
46194  # bat and cmd files are not always considered executable in cygwin causing which
46195  # to not find them
46196  if test "x$new_path" = x \
46197      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46198      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46199    new_path=`$CYGPATH -u "$path"`
46200  fi
46201  if test "x$new_path" = x; then
46202    # Oops. Which didn't find the executable.
46203    # The splitting of arguments from the executable at a space might have been incorrect,
46204    # since paths with space are more likely in Windows. Give it another try with the whole
46205    # argument.
46206    path="$complete"
46207    arguments="EOL"
46208    new_path=`$CYGPATH -u "$path"`
46209    new_path=`$WHICH "$new_path" 2> /dev/null`
46210    # bat and cmd files are not always considered executable in cygwin causing which
46211    # to not find them
46212    if test "x$new_path" = x \
46213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46215      new_path=`$CYGPATH -u "$path"`
46216    fi
46217    if test "x$new_path" = x; then
46218      # It's still not found. Now this is an unrecoverable error.
46219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46220$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46221      has_space=`$ECHO "$complete" | $GREP " "`
46222      if test "x$has_space" != x; then
46223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46225      fi
46226      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46227    fi
46228  fi
46229
46230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46233  # "foo.exe" is OK but "foo" is an error.
46234  #
46235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46236  # It is also a way to make sure we got the proper file name for the real test later on.
46237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46238  if test "x$test_shortpath" = x; then
46239    # Short path failed, file does not exist as specified.
46240    # Try adding .exe or .cmd
46241    if test -f "${new_path}.exe"; then
46242      input_to_shortpath="${new_path}.exe"
46243    elif test -f "${new_path}.cmd"; then
46244      input_to_shortpath="${new_path}.cmd"
46245    else
46246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46247$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46250      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46251    fi
46252  else
46253    input_to_shortpath="$new_path"
46254  fi
46255
46256  # Call helper function which possibly converts this using DOS-style short mode.
46257  # If so, the updated path is stored in $new_path.
46258  new_path="$input_to_shortpath"
46259
46260  input_path="$input_to_shortpath"
46261  # Check if we need to convert this using DOS-style short mode. If the path
46262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46263  # take no chances and rewrite it.
46264  # Note: m4 eats our [], so we need to use [ and ] instead.
46265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46266  if test "x$has_forbidden_chars" != x; then
46267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46271      # Going to short mode and back again did indeed matter. Since short mode is
46272      # case insensitive, let's make it lowercase to improve readability.
46273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46274      # Now convert it back to Unix-style (cygpath)
46275      input_path=`$CYGPATH -u "$shortmode_path"`
46276      new_path="$input_path"
46277    fi
46278  fi
46279
46280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46281  if test "x$test_cygdrive_prefix" = x; then
46282    # As a simple fix, exclude /usr/bin since it's not a real path.
46283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46285      # a path prefixed by /cygdrive for fixpath to work.
46286      new_path="$CYGWIN_ROOT_PATH$input_path"
46287    fi
46288  fi
46289
46290  # remove trailing .exe if any
46291  new_path="${new_path/%.exe/}"
46292
46293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294
46295  # First separate the path from the arguments. This will split at the first
46296  # space.
46297  complete="$BUILD_OBJCOPY"
46298  path="${complete%% *}"
46299  tmp="$complete EOL"
46300  arguments="${tmp#* }"
46301
46302  # Input might be given as Windows format, start by converting to
46303  # unix format.
46304  new_path="$path"
46305
46306  windows_path="$new_path"
46307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46308    unix_path=`$CYGPATH -u "$windows_path"`
46309    new_path="$unix_path"
46310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46312    new_path="$unix_path"
46313  fi
46314
46315
46316  # Now try to locate executable using which
46317  new_path=`$WHICH "$new_path" 2> /dev/null`
46318
46319  if test "x$new_path" = x; then
46320    # Oops. Which didn't find the executable.
46321    # The splitting of arguments from the executable at a space might have been incorrect,
46322    # since paths with space are more likely in Windows. Give it another try with the whole
46323    # argument.
46324    path="$complete"
46325    arguments="EOL"
46326    new_path="$path"
46327
46328  windows_path="$new_path"
46329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46330    unix_path=`$CYGPATH -u "$windows_path"`
46331    new_path="$unix_path"
46332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46334    new_path="$unix_path"
46335  fi
46336
46337
46338    new_path=`$WHICH "$new_path" 2> /dev/null`
46339    # bat and cmd files are not always considered executable in MSYS causing which
46340    # to not find them
46341    if test "x$new_path" = x \
46342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46344      new_path="$path"
46345
46346  windows_path="$new_path"
46347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46348    unix_path=`$CYGPATH -u "$windows_path"`
46349    new_path="$unix_path"
46350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46352    new_path="$unix_path"
46353  fi
46354
46355    fi
46356
46357    if test "x$new_path" = x; then
46358      # It's still not found. Now this is an unrecoverable error.
46359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46360$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46361      has_space=`$ECHO "$complete" | $GREP " "`
46362      if test "x$has_space" != x; then
46363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46365      fi
46366      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46367    fi
46368  fi
46369
46370  # Now new_path has a complete unix path to the binary
46371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46372    # Keep paths in /bin as-is, but remove trailing .exe if any
46373    new_path="${new_path/%.exe/}"
46374    # Do not save /bin paths to all_fixpath_prefixes!
46375  else
46376    # Not in mixed or Windows style, start by that.
46377    new_path=`cmd //c echo $new_path`
46378
46379  input_path="$new_path"
46380  # Check if we need to convert this using DOS-style short mode. If the path
46381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46382  # take no chances and rewrite it.
46383  # Note: m4 eats our [], so we need to use [ and ] instead.
46384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46385  if test "x$has_forbidden_chars" != x; then
46386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46388  fi
46389
46390    # Output is in $new_path
46391
46392  windows_path="$new_path"
46393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46394    unix_path=`$CYGPATH -u "$windows_path"`
46395    new_path="$unix_path"
46396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46398    new_path="$unix_path"
46399  fi
46400
46401    # remove trailing .exe if any
46402    new_path="${new_path/%.exe/}"
46403
46404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46406  fi
46407
46408    else
46409      # We're on a unix platform. Hooray! :)
46410      # First separate the path from the arguments. This will split at the first
46411      # space.
46412      complete="$BUILD_OBJCOPY"
46413      path="${complete%% *}"
46414      tmp="$complete EOL"
46415      arguments="${tmp#* }"
46416
46417      # Cannot rely on the command "which" here since it doesn't always work.
46418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46419      if test -z "$is_absolute_path"; then
46420        # Path to executable is not absolute. Find it.
46421        IFS_save="$IFS"
46422        IFS=:
46423        for p in $PATH; do
46424          if test -f "$p/$path" && test -x "$p/$path"; then
46425            new_path="$p/$path"
46426            break
46427          fi
46428        done
46429        IFS="$IFS_save"
46430      else
46431        # This is an absolute path, we can use it without further modifications.
46432        new_path="$path"
46433      fi
46434
46435      if test "x$new_path" = x; then
46436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46437$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46438        has_space=`$ECHO "$complete" | $GREP " "`
46439        if test "x$has_space" != x; then
46440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46442        fi
46443        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46444      fi
46445    fi
46446
46447    # Now join together the path and the arguments once again
46448    if test "x$arguments" != xEOL; then
46449      new_complete="$new_path ${arguments% *}"
46450    else
46451      new_complete="$new_path"
46452    fi
46453
46454    if test "x$complete" != "x$new_complete"; then
46455      BUILD_OBJCOPY="$new_complete"
46456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46457$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46458    fi
46459  fi
46460
46461
46462
46463  # Publish this variable in the help.
46464
46465
46466  if [ -z "${BUILD_STRIP+x}" ]; then
46467    # The variable is not set by user, try to locate tool using the code snippet
46468    for ac_prog in strip
46469do
46470  # Extract the first word of "$ac_prog", so it can be a program name with args.
46471set dummy $ac_prog; ac_word=$2
46472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46473$as_echo_n "checking for $ac_word... " >&6; }
46474if ${ac_cv_path_BUILD_STRIP+:} false; then :
46475  $as_echo_n "(cached) " >&6
46476else
46477  case $BUILD_STRIP in
46478  [\\/]* | ?:[\\/]*)
46479  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46480  ;;
46481  *)
46482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46483for as_dir in $PATH
46484do
46485  IFS=$as_save_IFS
46486  test -z "$as_dir" && as_dir=.
46487    for ac_exec_ext in '' $ac_executable_extensions; do
46488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46489    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46491    break 2
46492  fi
46493done
46494  done
46495IFS=$as_save_IFS
46496
46497  ;;
46498esac
46499fi
46500BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46501if test -n "$BUILD_STRIP"; then
46502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46503$as_echo "$BUILD_STRIP" >&6; }
46504else
46505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46506$as_echo "no" >&6; }
46507fi
46508
46509
46510  test -n "$BUILD_STRIP" && break
46511done
46512
46513  else
46514    # The variable is set, but is it from the command line or the environment?
46515
46516    # Try to remove the string !BUILD_STRIP! from our list.
46517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46519      # If it failed, the variable was not from the command line. Ignore it,
46520      # but warn the user (except for BASH, which is always set by the calling BASH).
46521      if test "xBUILD_STRIP" != xBASH; then
46522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46523$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46524      fi
46525      # Try to locate tool using the code snippet
46526      for ac_prog in strip
46527do
46528  # Extract the first word of "$ac_prog", so it can be a program name with args.
46529set dummy $ac_prog; ac_word=$2
46530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46531$as_echo_n "checking for $ac_word... " >&6; }
46532if ${ac_cv_path_BUILD_STRIP+:} false; then :
46533  $as_echo_n "(cached) " >&6
46534else
46535  case $BUILD_STRIP in
46536  [\\/]* | ?:[\\/]*)
46537  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46538  ;;
46539  *)
46540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46541for as_dir in $PATH
46542do
46543  IFS=$as_save_IFS
46544  test -z "$as_dir" && as_dir=.
46545    for ac_exec_ext in '' $ac_executable_extensions; do
46546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46547    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46549    break 2
46550  fi
46551done
46552  done
46553IFS=$as_save_IFS
46554
46555  ;;
46556esac
46557fi
46558BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46559if test -n "$BUILD_STRIP"; then
46560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46561$as_echo "$BUILD_STRIP" >&6; }
46562else
46563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46564$as_echo "no" >&6; }
46565fi
46566
46567
46568  test -n "$BUILD_STRIP" && break
46569done
46570
46571    else
46572      # If it succeeded, then it was overridden by the user. We will use it
46573      # for the tool.
46574
46575      # First remove it from the list of overridden variables, so we can test
46576      # for unknown variables in the end.
46577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46578
46579      # Check if we try to supply an empty value
46580      if test "x$BUILD_STRIP" = x; then
46581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46582$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46584$as_echo_n "checking for BUILD_STRIP... " >&6; }
46585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46586$as_echo "disabled" >&6; }
46587      else
46588        # Check if the provided tool contains a complete path.
46589        tool_specified="$BUILD_STRIP"
46590        tool_basename="${tool_specified##*/}"
46591        if test "x$tool_basename" = "x$tool_specified"; then
46592          # A command without a complete path is provided, search $PATH.
46593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46594$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46595          # Extract the first word of "$tool_basename", so it can be a program name with args.
46596set dummy $tool_basename; ac_word=$2
46597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46598$as_echo_n "checking for $ac_word... " >&6; }
46599if ${ac_cv_path_BUILD_STRIP+:} false; then :
46600  $as_echo_n "(cached) " >&6
46601else
46602  case $BUILD_STRIP in
46603  [\\/]* | ?:[\\/]*)
46604  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46605  ;;
46606  *)
46607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46608for as_dir in $PATH
46609do
46610  IFS=$as_save_IFS
46611  test -z "$as_dir" && as_dir=.
46612    for ac_exec_ext in '' $ac_executable_extensions; do
46613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46614    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46616    break 2
46617  fi
46618done
46619  done
46620IFS=$as_save_IFS
46621
46622  ;;
46623esac
46624fi
46625BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46626if test -n "$BUILD_STRIP"; then
46627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46628$as_echo "$BUILD_STRIP" >&6; }
46629else
46630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46631$as_echo "no" >&6; }
46632fi
46633
46634
46635          if test "x$BUILD_STRIP" = x; then
46636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46637          fi
46638        else
46639          # Otherwise we believe it is a complete path. Use it as it is.
46640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46641$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46643$as_echo_n "checking for BUILD_STRIP... " >&6; }
46644          if test ! -x "$tool_specified"; then
46645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46646$as_echo "not found" >&6; }
46647            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46648          fi
46649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46650$as_echo "$tool_specified" >&6; }
46651        fi
46652      fi
46653    fi
46654
46655  fi
46656
46657
46658
46659  # Only process if variable expands to non-empty
46660
46661  if test "x$BUILD_STRIP" != x; then
46662    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46663
46664  # First separate the path from the arguments. This will split at the first
46665  # space.
46666  complete="$BUILD_STRIP"
46667  path="${complete%% *}"
46668  tmp="$complete EOL"
46669  arguments="${tmp#* }"
46670
46671  # Input might be given as Windows format, start by converting to
46672  # unix format.
46673  new_path=`$CYGPATH -u "$path"`
46674
46675  # Now try to locate executable using which
46676  new_path=`$WHICH "$new_path" 2> /dev/null`
46677  # bat and cmd files are not always considered executable in cygwin causing which
46678  # to not find them
46679  if test "x$new_path" = x \
46680      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46681      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46682    new_path=`$CYGPATH -u "$path"`
46683  fi
46684  if test "x$new_path" = x; then
46685    # Oops. Which didn't find the executable.
46686    # The splitting of arguments from the executable at a space might have been incorrect,
46687    # since paths with space are more likely in Windows. Give it another try with the whole
46688    # argument.
46689    path="$complete"
46690    arguments="EOL"
46691    new_path=`$CYGPATH -u "$path"`
46692    new_path=`$WHICH "$new_path" 2> /dev/null`
46693    # bat and cmd files are not always considered executable in cygwin causing which
46694    # to not find them
46695    if test "x$new_path" = x \
46696        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46697        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46698      new_path=`$CYGPATH -u "$path"`
46699    fi
46700    if test "x$new_path" = x; then
46701      # It's still not found. Now this is an unrecoverable error.
46702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46703$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46704      has_space=`$ECHO "$complete" | $GREP " "`
46705      if test "x$has_space" != x; then
46706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46708      fi
46709      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46710    fi
46711  fi
46712
46713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46716  # "foo.exe" is OK but "foo" is an error.
46717  #
46718  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46719  # It is also a way to make sure we got the proper file name for the real test later on.
46720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46721  if test "x$test_shortpath" = x; then
46722    # Short path failed, file does not exist as specified.
46723    # Try adding .exe or .cmd
46724    if test -f "${new_path}.exe"; then
46725      input_to_shortpath="${new_path}.exe"
46726    elif test -f "${new_path}.cmd"; then
46727      input_to_shortpath="${new_path}.cmd"
46728    else
46729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46730$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46731      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46732$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46733      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46734    fi
46735  else
46736    input_to_shortpath="$new_path"
46737  fi
46738
46739  # Call helper function which possibly converts this using DOS-style short mode.
46740  # If so, the updated path is stored in $new_path.
46741  new_path="$input_to_shortpath"
46742
46743  input_path="$input_to_shortpath"
46744  # Check if we need to convert this using DOS-style short mode. If the path
46745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46746  # take no chances and rewrite it.
46747  # Note: m4 eats our [], so we need to use [ and ] instead.
46748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46749  if test "x$has_forbidden_chars" != x; then
46750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46754      # Going to short mode and back again did indeed matter. Since short mode is
46755      # case insensitive, let's make it lowercase to improve readability.
46756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46757      # Now convert it back to Unix-style (cygpath)
46758      input_path=`$CYGPATH -u "$shortmode_path"`
46759      new_path="$input_path"
46760    fi
46761  fi
46762
46763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46764  if test "x$test_cygdrive_prefix" = x; then
46765    # As a simple fix, exclude /usr/bin since it's not a real path.
46766    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46768      # a path prefixed by /cygdrive for fixpath to work.
46769      new_path="$CYGWIN_ROOT_PATH$input_path"
46770    fi
46771  fi
46772
46773  # remove trailing .exe if any
46774  new_path="${new_path/%.exe/}"
46775
46776    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46777
46778  # First separate the path from the arguments. This will split at the first
46779  # space.
46780  complete="$BUILD_STRIP"
46781  path="${complete%% *}"
46782  tmp="$complete EOL"
46783  arguments="${tmp#* }"
46784
46785  # Input might be given as Windows format, start by converting to
46786  # unix format.
46787  new_path="$path"
46788
46789  windows_path="$new_path"
46790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46791    unix_path=`$CYGPATH -u "$windows_path"`
46792    new_path="$unix_path"
46793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46795    new_path="$unix_path"
46796  fi
46797
46798
46799  # Now try to locate executable using which
46800  new_path=`$WHICH "$new_path" 2> /dev/null`
46801
46802  if test "x$new_path" = x; then
46803    # Oops. Which didn't find the executable.
46804    # The splitting of arguments from the executable at a space might have been incorrect,
46805    # since paths with space are more likely in Windows. Give it another try with the whole
46806    # argument.
46807    path="$complete"
46808    arguments="EOL"
46809    new_path="$path"
46810
46811  windows_path="$new_path"
46812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46813    unix_path=`$CYGPATH -u "$windows_path"`
46814    new_path="$unix_path"
46815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46817    new_path="$unix_path"
46818  fi
46819
46820
46821    new_path=`$WHICH "$new_path" 2> /dev/null`
46822    # bat and cmd files are not always considered executable in MSYS causing which
46823    # to not find them
46824    if test "x$new_path" = x \
46825        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46826        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46827      new_path="$path"
46828
46829  windows_path="$new_path"
46830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46831    unix_path=`$CYGPATH -u "$windows_path"`
46832    new_path="$unix_path"
46833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46835    new_path="$unix_path"
46836  fi
46837
46838    fi
46839
46840    if test "x$new_path" = x; then
46841      # It's still not found. Now this is an unrecoverable error.
46842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46843$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46844      has_space=`$ECHO "$complete" | $GREP " "`
46845      if test "x$has_space" != x; then
46846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46848      fi
46849      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46850    fi
46851  fi
46852
46853  # Now new_path has a complete unix path to the binary
46854  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46855    # Keep paths in /bin as-is, but remove trailing .exe if any
46856    new_path="${new_path/%.exe/}"
46857    # Do not save /bin paths to all_fixpath_prefixes!
46858  else
46859    # Not in mixed or Windows style, start by that.
46860    new_path=`cmd //c echo $new_path`
46861
46862  input_path="$new_path"
46863  # Check if we need to convert this using DOS-style short mode. If the path
46864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46865  # take no chances and rewrite it.
46866  # Note: m4 eats our [], so we need to use [ and ] instead.
46867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46868  if test "x$has_forbidden_chars" != x; then
46869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46871  fi
46872
46873    # Output is in $new_path
46874
46875  windows_path="$new_path"
46876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46877    unix_path=`$CYGPATH -u "$windows_path"`
46878    new_path="$unix_path"
46879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46881    new_path="$unix_path"
46882  fi
46883
46884    # remove trailing .exe if any
46885    new_path="${new_path/%.exe/}"
46886
46887    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46888    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46889  fi
46890
46891    else
46892      # We're on a unix platform. Hooray! :)
46893      # First separate the path from the arguments. This will split at the first
46894      # space.
46895      complete="$BUILD_STRIP"
46896      path="${complete%% *}"
46897      tmp="$complete EOL"
46898      arguments="${tmp#* }"
46899
46900      # Cannot rely on the command "which" here since it doesn't always work.
46901      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46902      if test -z "$is_absolute_path"; then
46903        # Path to executable is not absolute. Find it.
46904        IFS_save="$IFS"
46905        IFS=:
46906        for p in $PATH; do
46907          if test -f "$p/$path" && test -x "$p/$path"; then
46908            new_path="$p/$path"
46909            break
46910          fi
46911        done
46912        IFS="$IFS_save"
46913      else
46914        # This is an absolute path, we can use it without further modifications.
46915        new_path="$path"
46916      fi
46917
46918      if test "x$new_path" = x; then
46919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46920$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46921        has_space=`$ECHO "$complete" | $GREP " "`
46922        if test "x$has_space" != x; then
46923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46925        fi
46926        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46927      fi
46928    fi
46929
46930    # Now join together the path and the arguments once again
46931    if test "x$arguments" != xEOL; then
46932      new_complete="$new_path ${arguments% *}"
46933    else
46934      new_complete="$new_path"
46935    fi
46936
46937    if test "x$complete" != "x$new_complete"; then
46938      BUILD_STRIP="$new_complete"
46939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46940$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46941    fi
46942  fi
46943
46944    # Assume the C compiler is the assembler
46945    BUILD_AS="$BUILD_CC -c"
46946    # Just like for the target compiler, use the compiler as linker
46947    BUILD_LD="$BUILD_CC"
46948    BUILD_LDCXX="$BUILD_CXX"
46949
46950    PATH="$OLDPATH"
46951
46952
46953  COMPILER=$BUILD_CC
46954  COMPILER_NAME=BuildC
46955
46956  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46957    # cc -V output typically looks like
46958    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46959    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46960    # Check that this is likely to be the Solaris Studio cc.
46961    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46962    if test $? -ne 0; then
46963      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46964      { $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
46965$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46966      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46967$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46968      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46969$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46970      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46971    fi
46972    # Remove usage instructions (if present), and
46973    # collapse compiler output into a single line
46974    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46975        $SED -e 's/ *[Uu]sage:.*//'`
46976    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46977        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46978  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46979    # xlc -qversion output typically looks like
46980    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46981    #     Version: 11.01.0000.0015
46982    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46983    # Check that this is likely to be the IBM XL C compiler.
46984    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46985    if test $? -ne 0; then
46986      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46987      { $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
46988$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46989      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46990$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46991      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46992$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46993      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46994    fi
46995    # Collapse compiler output into a single line
46996    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46997    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46998        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46999  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47000    # There is no specific version flag, but all output starts with a version string.
47001    # First line typically looks something like:
47002    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47003    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47004    # Check that this is likely to be Microsoft CL.EXE.
47005    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47006    if test $? -ne 0; then
47007      { $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
47008$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47009      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47010$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47011      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47012    fi
47013    # Collapse compiler output into a single line
47014    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47015    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47016        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47017  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47018    # gcc --version output typically looks like
47019    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47020    #     Copyright (C) 2013 Free Software Foundation, Inc.
47021    #     This is free software; see the source for copying conditions.  There is NO
47022    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47023    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47024    # Check that this is likely to be GCC.
47025    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47026    if test $? -ne 0; then
47027      { $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
47028$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47029      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47030$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47031      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47032    fi
47033    # Remove Copyright and legalese from version string, and
47034    # collapse into a single line
47035    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47036        $SED -e 's/ *Copyright .*//'`
47037    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47038        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47039  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47040    # clang --version output typically looks like
47041    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47042    #    clang version 3.3 (tags/RELEASE_33/final)
47043    # or
47044    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47045    #    Target: x86_64-pc-linux-gnu
47046    #    Thread model: posix
47047    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47048    # Check that this is likely to be clang
47049    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47050    if test $? -ne 0; then
47051      { $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
47052$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47053      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47054$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47055      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47056    fi
47057    # Collapse compiler output into a single line
47058    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47059    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47060        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47061  else
47062      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47063  fi
47064  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47065  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47066  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47067  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47068
47069  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47070$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47071
47072
47073  COMPILER=$BUILD_CXX
47074  COMPILER_NAME=BuildC++
47075
47076  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47077    # cc -V output typically looks like
47078    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47079    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47080    # Check that this is likely to be the Solaris Studio cc.
47081    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47082    if test $? -ne 0; then
47083      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47084      { $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
47085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47087$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47089$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47090      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47091    fi
47092    # Remove usage instructions (if present), and
47093    # collapse compiler output into a single line
47094    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47095        $SED -e 's/ *[Uu]sage:.*//'`
47096    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47097        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47098  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47099    # xlc -qversion output typically looks like
47100    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47101    #     Version: 11.01.0000.0015
47102    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47103    # Check that this is likely to be the IBM XL C compiler.
47104    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47105    if test $? -ne 0; then
47106      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47107      { $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
47108$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47109      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47110$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47112$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47113      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47114    fi
47115    # Collapse compiler output into a single line
47116    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47117    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47118        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47119  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47120    # There is no specific version flag, but all output starts with a version string.
47121    # First line typically looks something like:
47122    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47123    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47124    # Check that this is likely to be Microsoft CL.EXE.
47125    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47126    if test $? -ne 0; then
47127      { $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
47128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47130$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47131      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47132    fi
47133    # Collapse compiler output into a single line
47134    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47135    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47136        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47137  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47138    # gcc --version output typically looks like
47139    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47140    #     Copyright (C) 2013 Free Software Foundation, Inc.
47141    #     This is free software; see the source for copying conditions.  There is NO
47142    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47143    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47144    # Check that this is likely to be GCC.
47145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47146    if test $? -ne 0; then
47147      { $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
47148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47150$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47152    fi
47153    # Remove Copyright and legalese from version string, and
47154    # collapse into a single line
47155    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47156        $SED -e 's/ *Copyright .*//'`
47157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47158        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47159  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47160    # clang --version output typically looks like
47161    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47162    #    clang version 3.3 (tags/RELEASE_33/final)
47163    # or
47164    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47165    #    Target: x86_64-pc-linux-gnu
47166    #    Thread model: posix
47167    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47168    # Check that this is likely to be clang
47169    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47170    if test $? -ne 0; then
47171      { $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
47172$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47173      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47174$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47175      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47176    fi
47177    # Collapse compiler output into a single line
47178    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47179    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47180        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47181  else
47182      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47183  fi
47184  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47185  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47186  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47187  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47188
47189  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47190$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47191
47192
47193  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47194    { $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
47195$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47196    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47197$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47198  fi
47199
47200  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47201  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47202    { $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
47203$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;}
47204  fi
47205
47206  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47207    { $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
47208$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47209  fi
47210
47211  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47212
47213  else
47214    # If we are not cross compiling, use the normal target compilers for
47215    # building the build platform executables.
47216    BUILD_CC="$CC"
47217    BUILD_CXX="$CXX"
47218    BUILD_LD="$LD"
47219    BUILD_LDCXX="$LDCXX"
47220    BUILD_NM="$NM"
47221    BUILD_AS="$AS"
47222    BUILD_OBJCOPY="$OBJCOPY"
47223    BUILD_STRIP="$STRIP"
47224    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47225    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47226    BUILD_AR="$AR"
47227
47228
47229  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47230    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47231$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47233$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47234  fi
47235
47236  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47237  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47238    { $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
47239$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;}
47240  fi
47241
47242  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47243    { $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
47244$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47245  fi
47246
47247  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47248
47249  fi
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47263    # For hotspot, we need these in Windows mixed path,
47264    # so rewrite them all. Need added .exe suffix.
47265    HOTSPOT_CXX="$CXX.exe"
47266    HOTSPOT_LD="$LD.exe"
47267    HOTSPOT_MT="$MT.exe"
47268    HOTSPOT_RC="$RC.exe"
47269
47270  unix_path="$HOTSPOT_CXX"
47271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47272    windows_path=`$CYGPATH -m "$unix_path"`
47273    HOTSPOT_CXX="$windows_path"
47274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47275    windows_path=`cmd //c echo $unix_path`
47276    HOTSPOT_CXX="$windows_path"
47277  fi
47278
47279
47280  unix_path="$HOTSPOT_LD"
47281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47282    windows_path=`$CYGPATH -m "$unix_path"`
47283    HOTSPOT_LD="$windows_path"
47284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47285    windows_path=`cmd //c echo $unix_path`
47286    HOTSPOT_LD="$windows_path"
47287  fi
47288
47289
47290  unix_path="$HOTSPOT_MT"
47291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47292    windows_path=`$CYGPATH -m "$unix_path"`
47293    HOTSPOT_MT="$windows_path"
47294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47295    windows_path=`cmd //c echo $unix_path`
47296    HOTSPOT_MT="$windows_path"
47297  fi
47298
47299
47300  unix_path="$HOTSPOT_RC"
47301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302    windows_path=`$CYGPATH -m "$unix_path"`
47303    HOTSPOT_RC="$windows_path"
47304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47305    windows_path=`cmd //c echo $unix_path`
47306    HOTSPOT_RC="$windows_path"
47307  fi
47308
47309
47310
47311  else
47312    HOTSPOT_CXX="$CXX"
47313    HOTSPOT_LD="$LD"
47314  fi
47315
47316
47317
47318  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47319    USE_CLANG=true
47320  fi
47321
47322
47323
47324
47325
47326  # The package path is used only on macosx?
47327  # FIXME: clean this up, and/or move it elsewhere.
47328  PACKAGE_PATH=/opt/local
47329
47330
47331  # Check for extra potential brokenness.
47332  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47333    # On Windows, double-check that we got the right compiler.
47334    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47335    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47336    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47337      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47338        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
47339      fi
47340    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47341      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47342        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47343      fi
47344    fi
47345  fi
47346
47347  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47348    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47349    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47350    # This is later checked when setting flags.
47351
47352    # "-Og" suppported for GCC 4.8 and later
47353    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401    # Execute function body
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
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450    # Execute function body
47451
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47453$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47454  supports=yes
47455
47456  saved_cflags="$CFLAGS"
47457  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47458  ac_ext=c
47459ac_cpp='$CPP $CPPFLAGS'
47460ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47461ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47462ac_compiler_gnu=$ac_cv_c_compiler_gnu
47463
47464  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47465/* end confdefs.h.  */
47466int i;
47467_ACEOF
47468if ac_fn_c_try_compile "$LINENO"; then :
47469
47470else
47471  supports=no
47472fi
47473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47474  ac_ext=cpp
47475ac_cpp='$CXXCPP $CPPFLAGS'
47476ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47477ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47478ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47479
47480  CFLAGS="$saved_cflags"
47481
47482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47483$as_echo "$supports" >&6; }
47484  if test "x$supports" = "xyes" ; then
47485    :
47486    C_COMP_SUPPORTS="yes"
47487  else
47488    :
47489    C_COMP_SUPPORTS="no"
47490  fi
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
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550    # Execute function body
47551
47552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47553$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47554  supports=yes
47555
47556  saved_cxxflags="$CXXFLAGS"
47557  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47558  ac_ext=cpp
47559ac_cpp='$CXXCPP $CPPFLAGS'
47560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47563
47564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47565/* end confdefs.h.  */
47566int i;
47567_ACEOF
47568if ac_fn_cxx_try_compile "$LINENO"; then :
47569
47570else
47571  supports=no
47572fi
47573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47574  ac_ext=cpp
47575ac_cpp='$CXXCPP $CPPFLAGS'
47576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47579
47580  CXXFLAGS="$saved_cxxflags"
47581
47582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47583$as_echo "$supports" >&6; }
47584  if test "x$supports" = "xyes" ; then
47585    :
47586    CXX_COMP_SUPPORTS="yes"
47587  else
47588    :
47589    CXX_COMP_SUPPORTS="no"
47590  fi
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47605$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47606  supports=no
47607  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47608
47609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47610$as_echo "$supports" >&6; }
47611  if test "x$supports" = "xyes" ; then
47612    :
47613    HAS_CFLAG_OPTIMIZE_DEBUG=true
47614  else
47615    :
47616    HAS_CFLAG_OPTIMIZE_DEBUG=false
47617  fi
47618
47619
47620
47621
47622
47623
47624
47625    # "-z relro" supported in GNU binutils 2.17 and later
47626    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674    # Execute function body
47675
47676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47677$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47678  supports=yes
47679
47680  saved_ldflags="$LDFLAGS"
47681  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47682  ac_ext=c
47683ac_cpp='$CPP $CPPFLAGS'
47684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47686ac_compiler_gnu=$ac_cv_c_compiler_gnu
47687
47688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47689/* end confdefs.h.  */
47690
47691int
47692main ()
47693{
47694
47695  ;
47696  return 0;
47697}
47698_ACEOF
47699if ac_fn_c_try_link "$LINENO"; then :
47700
47701else
47702  supports=no
47703fi
47704rm -f core conftest.err conftest.$ac_objext \
47705    conftest$ac_exeext conftest.$ac_ext
47706  ac_ext=cpp
47707ac_cpp='$CXXCPP $CPPFLAGS'
47708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47711
47712  LDFLAGS="$saved_ldflags"
47713
47714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47715$as_echo "$supports" >&6; }
47716  if test "x$supports" = "xyes" ; then
47717    :
47718    HAS_LINKER_RELRO=true
47719  else
47720    :
47721    HAS_LINKER_RELRO=false
47722  fi
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736    # "-z now" supported in GNU binutils 2.11 and later
47737    LINKER_NOW_FLAG="-Wl,-z,now"
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785    # Execute function body
47786
47787  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47788$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47789  supports=yes
47790
47791  saved_ldflags="$LDFLAGS"
47792  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47793  ac_ext=c
47794ac_cpp='$CPP $CPPFLAGS'
47795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47797ac_compiler_gnu=$ac_cv_c_compiler_gnu
47798
47799  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47800/* end confdefs.h.  */
47801
47802int
47803main ()
47804{
47805
47806  ;
47807  return 0;
47808}
47809_ACEOF
47810if ac_fn_c_try_link "$LINENO"; then :
47811
47812else
47813  supports=no
47814fi
47815rm -f core conftest.err conftest.$ac_objext \
47816    conftest$ac_exeext conftest.$ac_ext
47817  ac_ext=cpp
47818ac_cpp='$CXXCPP $CPPFLAGS'
47819ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47820ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47821ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47822
47823  LDFLAGS="$saved_ldflags"
47824
47825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47826$as_echo "$supports" >&6; }
47827  if test "x$supports" = "xyes" ; then
47828    :
47829    HAS_LINKER_NOW=true
47830  else
47831    :
47832    HAS_LINKER_NOW=false
47833  fi
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846  fi
47847
47848  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47849  # in executable.'
47850  USING_BROKEN_SUSE_LD=no
47851  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47853$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47854    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47855    $ECHO "int main() { }" > main.c
47856    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47857      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47858$as_echo "no" >&6; }
47859      USING_BROKEN_SUSE_LD=no
47860    else
47861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47862$as_echo "yes" >&6; }
47863      USING_BROKEN_SUSE_LD=yes
47864    fi
47865    $RM version-script.map main.c a.out
47866  fi
47867
47868
47869  # Setup hotspot lecagy names for toolchains
47870  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47871  if test "x$TOOLCHAIN_TYPE" = xclang; then
47872    HOTSPOT_TOOLCHAIN_TYPE=gcc
47873  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47874    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47875  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47876    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47877  fi
47878
47879
47880
47881# Setup the JTReg Regression Test Harness.
47882
47883
47884# Check whether --with-jtreg was given.
47885if test "${with_jtreg+set}" = set; then :
47886  withval=$with_jtreg;
47887else
47888  with_jtreg=no
47889fi
47890
47891
47892  if test "x$with_jtreg" = xno; then
47893    # jtreg disabled
47894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47895$as_echo_n "checking for jtreg... " >&6; }
47896    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47897$as_echo "no" >&6; }
47898  else
47899    if test "x$with_jtreg" != xyes; then
47900      # with path specified.
47901      JT_HOME="$with_jtreg"
47902    fi
47903
47904    if test "x$JT_HOME" != x; then
47905      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47906$as_echo_n "checking for jtreg... " >&6; }
47907
47908      # use JT_HOME enviroment var.
47909
47910  # Only process if variable expands to non-empty
47911
47912  if test "x$JT_HOME" != x; then
47913    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47914
47915  # Input might be given as Windows format, start by converting to
47916  # unix format.
47917  path="$JT_HOME"
47918  new_path=`$CYGPATH -u "$path"`
47919
47920  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47921  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47922  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47923  # "foo.exe" is OK but "foo" is an error.
47924  #
47925  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47926  # It is also a way to make sure we got the proper file name for the real test later on.
47927  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47928  if test "x$test_shortpath" = x; then
47929    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47930$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47931    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47932  fi
47933
47934  # Call helper function which possibly converts this using DOS-style short mode.
47935  # If so, the updated path is stored in $new_path.
47936
47937  input_path="$new_path"
47938  # Check if we need to convert this using DOS-style short mode. If the path
47939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47940  # take no chances and rewrite it.
47941  # Note: m4 eats our [], so we need to use [ and ] instead.
47942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47943  if test "x$has_forbidden_chars" != x; then
47944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47945    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47946    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47947    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47948      # Going to short mode and back again did indeed matter. Since short mode is
47949      # case insensitive, let's make it lowercase to improve readability.
47950      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47951      # Now convert it back to Unix-style (cygpath)
47952      input_path=`$CYGPATH -u "$shortmode_path"`
47953      new_path="$input_path"
47954    fi
47955  fi
47956
47957  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47958  if test "x$test_cygdrive_prefix" = x; then
47959    # As a simple fix, exclude /usr/bin since it's not a real path.
47960    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47961      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47962      # a path prefixed by /cygdrive for fixpath to work.
47963      new_path="$CYGWIN_ROOT_PATH$input_path"
47964    fi
47965  fi
47966
47967
47968  if test "x$path" != "x$new_path"; then
47969    JT_HOME="$new_path"
47970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47971$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47972  fi
47973
47974    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47975
47976  path="$JT_HOME"
47977  has_colon=`$ECHO $path | $GREP ^.:`
47978  new_path="$path"
47979  if test "x$has_colon" = x; then
47980    # Not in mixed or Windows style, start by that.
47981    new_path=`cmd //c echo $path`
47982  fi
47983
47984
47985  input_path="$new_path"
47986  # Check if we need to convert this using DOS-style short mode. If the path
47987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47988  # take no chances and rewrite it.
47989  # Note: m4 eats our [], so we need to use [ and ] instead.
47990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47991  if test "x$has_forbidden_chars" != x; then
47992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47994  fi
47995
47996
47997  windows_path="$new_path"
47998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47999    unix_path=`$CYGPATH -u "$windows_path"`
48000    new_path="$unix_path"
48001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48003    new_path="$unix_path"
48004  fi
48005
48006  if test "x$path" != "x$new_path"; then
48007    JT_HOME="$new_path"
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48009$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48010  fi
48011
48012  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48013  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48014
48015    else
48016      # We're on a unix platform. Hooray! :)
48017      path="$JT_HOME"
48018      has_space=`$ECHO "$path" | $GREP " "`
48019      if test "x$has_space" != x; then
48020        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48021$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48022        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48023      fi
48024
48025      # Use eval to expand a potential ~
48026      eval path="$path"
48027      if test ! -f "$path" && test ! -d "$path"; then
48028        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48029      fi
48030
48031      if test -d "$path"; then
48032        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48033      else
48034        dir="`$DIRNAME "$path"`"
48035        base="`$BASENAME "$path"`"
48036        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48037      fi
48038    fi
48039  fi
48040
48041
48042      # jtreg win32 script works for everybody
48043      JTREGEXE="$JT_HOME/bin/jtreg"
48044
48045      if test ! -f "$JTREGEXE"; then
48046        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48047      fi
48048
48049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48050$as_echo "$JTREGEXE" >&6; }
48051    else
48052      # try to find jtreg on path
48053
48054
48055
48056  # Publish this variable in the help.
48057
48058
48059  if [ -z "${JTREGEXE+x}" ]; then
48060    # The variable is not set by user, try to locate tool using the code snippet
48061    for ac_prog in jtreg
48062do
48063  # Extract the first word of "$ac_prog", so it can be a program name with args.
48064set dummy $ac_prog; ac_word=$2
48065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48066$as_echo_n "checking for $ac_word... " >&6; }
48067if ${ac_cv_path_JTREGEXE+:} false; then :
48068  $as_echo_n "(cached) " >&6
48069else
48070  case $JTREGEXE in
48071  [\\/]* | ?:[\\/]*)
48072  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48073  ;;
48074  *)
48075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48076for as_dir in $PATH
48077do
48078  IFS=$as_save_IFS
48079  test -z "$as_dir" && as_dir=.
48080    for ac_exec_ext in '' $ac_executable_extensions; do
48081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48082    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48084    break 2
48085  fi
48086done
48087  done
48088IFS=$as_save_IFS
48089
48090  ;;
48091esac
48092fi
48093JTREGEXE=$ac_cv_path_JTREGEXE
48094if test -n "$JTREGEXE"; then
48095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48096$as_echo "$JTREGEXE" >&6; }
48097else
48098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48099$as_echo "no" >&6; }
48100fi
48101
48102
48103  test -n "$JTREGEXE" && break
48104done
48105
48106  else
48107    # The variable is set, but is it from the command line or the environment?
48108
48109    # Try to remove the string !JTREGEXE! from our list.
48110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48112      # If it failed, the variable was not from the command line. Ignore it,
48113      # but warn the user (except for BASH, which is always set by the calling BASH).
48114      if test "xJTREGEXE" != xBASH; then
48115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48116$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48117      fi
48118      # Try to locate tool using the code snippet
48119      for ac_prog in jtreg
48120do
48121  # Extract the first word of "$ac_prog", so it can be a program name with args.
48122set dummy $ac_prog; ac_word=$2
48123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48124$as_echo_n "checking for $ac_word... " >&6; }
48125if ${ac_cv_path_JTREGEXE+:} false; then :
48126  $as_echo_n "(cached) " >&6
48127else
48128  case $JTREGEXE in
48129  [\\/]* | ?:[\\/]*)
48130  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48131  ;;
48132  *)
48133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48134for as_dir in $PATH
48135do
48136  IFS=$as_save_IFS
48137  test -z "$as_dir" && as_dir=.
48138    for ac_exec_ext in '' $ac_executable_extensions; do
48139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48140    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48142    break 2
48143  fi
48144done
48145  done
48146IFS=$as_save_IFS
48147
48148  ;;
48149esac
48150fi
48151JTREGEXE=$ac_cv_path_JTREGEXE
48152if test -n "$JTREGEXE"; then
48153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48154$as_echo "$JTREGEXE" >&6; }
48155else
48156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48157$as_echo "no" >&6; }
48158fi
48159
48160
48161  test -n "$JTREGEXE" && break
48162done
48163
48164    else
48165      # If it succeeded, then it was overridden by the user. We will use it
48166      # for the tool.
48167
48168      # First remove it from the list of overridden variables, so we can test
48169      # for unknown variables in the end.
48170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48171
48172      # Check if we try to supply an empty value
48173      if test "x$JTREGEXE" = x; then
48174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48175$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48177$as_echo_n "checking for JTREGEXE... " >&6; }
48178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48179$as_echo "disabled" >&6; }
48180      else
48181        # Check if the provided tool contains a complete path.
48182        tool_specified="$JTREGEXE"
48183        tool_basename="${tool_specified##*/}"
48184        if test "x$tool_basename" = "x$tool_specified"; then
48185          # A command without a complete path is provided, search $PATH.
48186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48187$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48188          # Extract the first word of "$tool_basename", so it can be a program name with args.
48189set dummy $tool_basename; ac_word=$2
48190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48191$as_echo_n "checking for $ac_word... " >&6; }
48192if ${ac_cv_path_JTREGEXE+:} false; then :
48193  $as_echo_n "(cached) " >&6
48194else
48195  case $JTREGEXE in
48196  [\\/]* | ?:[\\/]*)
48197  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48198  ;;
48199  *)
48200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48201for as_dir in $PATH
48202do
48203  IFS=$as_save_IFS
48204  test -z "$as_dir" && as_dir=.
48205    for ac_exec_ext in '' $ac_executable_extensions; do
48206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48207    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48209    break 2
48210  fi
48211done
48212  done
48213IFS=$as_save_IFS
48214
48215  ;;
48216esac
48217fi
48218JTREGEXE=$ac_cv_path_JTREGEXE
48219if test -n "$JTREGEXE"; then
48220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48221$as_echo "$JTREGEXE" >&6; }
48222else
48223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48224$as_echo "no" >&6; }
48225fi
48226
48227
48228          if test "x$JTREGEXE" = x; then
48229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48230          fi
48231        else
48232          # Otherwise we believe it is a complete path. Use it as it is.
48233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48234$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48236$as_echo_n "checking for JTREGEXE... " >&6; }
48237          if test ! -x "$tool_specified"; then
48238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48239$as_echo "not found" >&6; }
48240            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48241          fi
48242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48243$as_echo "$tool_specified" >&6; }
48244        fi
48245      fi
48246    fi
48247
48248  fi
48249
48250
48251
48252  if test "x$JTREGEXE" = x; then
48253    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48254  fi
48255
48256
48257      JT_HOME="`$DIRNAME $JTREGEXE`"
48258    fi
48259  fi
48260
48261
48262
48263
48264
48265
48266  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48267  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48268  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48269  #                              commands produced by the link step (currently AIX only)
48270  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48271    COMPILER_TARGET_BITS_FLAG="-q"
48272    COMPILER_COMMAND_FILE_FLAG="-f"
48273    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48274  else
48275    COMPILER_TARGET_BITS_FLAG="-m"
48276    COMPILER_COMMAND_FILE_FLAG="@"
48277    COMPILER_BINDCMD_FILE_FLAG=""
48278
48279    # The solstudio linker does not support @-files.
48280    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48281      COMPILER_COMMAND_FILE_FLAG=
48282    fi
48283
48284    # Check if @file is supported by gcc
48285    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48287$as_echo_n "checking if @file is supported by gcc... " >&6; }
48288      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48289      $ECHO "" "--version" > command.file
48290      if $CXX @command.file 2>&5 >&5; then
48291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48292$as_echo "yes" >&6; }
48293        COMPILER_COMMAND_FILE_FLAG="@"
48294      else
48295        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48296$as_echo "no" >&6; }
48297        COMPILER_COMMAND_FILE_FLAG=
48298      fi
48299      $RM command.file
48300    fi
48301  fi
48302
48303
48304
48305
48306  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48307  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48308    ARFLAGS="-r"
48309  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48310    ARFLAGS="-X64"
48311  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48312    # lib.exe is used as AR to create static libraries.
48313    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48314  else
48315    ARFLAGS=""
48316  fi
48317
48318
48319  ## Setup strip.
48320  # FIXME: should this really be per platform, or should it be per toolchain type?
48321  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48322  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48323  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48324    STRIPFLAGS="-g"
48325  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48326    STRIPFLAGS="-x"
48327  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48328    STRIPFLAGS="-S"
48329  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48330    STRIPFLAGS="-X32_64"
48331  fi
48332
48333
48334
48335  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48336    CC_OUT_OPTION=-Fo
48337    EXE_OUT_OPTION=-out:
48338    LD_OUT_OPTION=-out:
48339    AR_OUT_OPTION=-out:
48340  else
48341    # The option used to specify the target .o,.a or .so file.
48342    # When compiling, how to specify the to be created object file.
48343    CC_OUT_OPTION='-o$(SPACE)'
48344    # When linking, how to specify the to be created executable.
48345    EXE_OUT_OPTION='-o$(SPACE)'
48346    # When linking, how to specify the to be created dynamically linkable library.
48347    LD_OUT_OPTION='-o$(SPACE)'
48348    # When archiving, how to specify the to be create static archive for object files.
48349    AR_OUT_OPTION='rcs$(SPACE)'
48350  fi
48351
48352
48353
48354
48355
48356  # On Windows, we need to set RC flags.
48357  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48358    RC_FLAGS="-nologo -l0x409"
48359    JVM_RCFLAGS="-nologo"
48360    if test "x$DEBUG_LEVEL" = xrelease; then
48361      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48362      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48363    fi
48364
48365    # The version variables used to create RC_FLAGS may be overridden
48366    # in a custom configure script, or possibly the command line.
48367    # Let those variables be expanded at make time in spec.gmk.
48368    # The \$ are escaped to the shell, and the $(...) variables
48369    # are evaluated by make.
48370    RC_FLAGS="$RC_FLAGS \
48371        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48372        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48373        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48374        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48375        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48376        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48377        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48378
48379    JVM_RCFLAGS="$JVM_RCFLAGS \
48380        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48381        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48382        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48383        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48384        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48385        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48386        -D\"HS_FNAME=jvm.dll\" \
48387        -D\"HS_INTERNAL_NAME=jvm\""
48388  fi
48389
48390
48391
48392  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48393    # silence copyright notice and other headers.
48394    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48395  fi
48396
48397
48398# Now we can test some aspects on the target using configure macros.
48399
48400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48401$as_echo_n "checking for ANSI C header files... " >&6; }
48402if ${ac_cv_header_stdc+:} false; then :
48403  $as_echo_n "(cached) " >&6
48404else
48405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48406/* end confdefs.h.  */
48407#include <stdlib.h>
48408#include <stdarg.h>
48409#include <string.h>
48410#include <float.h>
48411
48412int
48413main ()
48414{
48415
48416  ;
48417  return 0;
48418}
48419_ACEOF
48420if ac_fn_cxx_try_compile "$LINENO"; then :
48421  ac_cv_header_stdc=yes
48422else
48423  ac_cv_header_stdc=no
48424fi
48425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48426
48427if test $ac_cv_header_stdc = yes; then
48428  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48429  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48430/* end confdefs.h.  */
48431#include <string.h>
48432
48433_ACEOF
48434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48435  $EGREP "memchr" >/dev/null 2>&1; then :
48436
48437else
48438  ac_cv_header_stdc=no
48439fi
48440rm -f conftest*
48441
48442fi
48443
48444if test $ac_cv_header_stdc = yes; then
48445  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48446  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48447/* end confdefs.h.  */
48448#include <stdlib.h>
48449
48450_ACEOF
48451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48452  $EGREP "free" >/dev/null 2>&1; then :
48453
48454else
48455  ac_cv_header_stdc=no
48456fi
48457rm -f conftest*
48458
48459fi
48460
48461if test $ac_cv_header_stdc = yes; then
48462  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48463  if test "$cross_compiling" = yes; then :
48464  :
48465else
48466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48467/* end confdefs.h.  */
48468#include <ctype.h>
48469#include <stdlib.h>
48470#if ((' ' & 0x0FF) == 0x020)
48471# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48472# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48473#else
48474# define ISLOWER(c) \
48475		   (('a' <= (c) && (c) <= 'i') \
48476		     || ('j' <= (c) && (c) <= 'r') \
48477		     || ('s' <= (c) && (c) <= 'z'))
48478# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48479#endif
48480
48481#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48482int
48483main ()
48484{
48485  int i;
48486  for (i = 0; i < 256; i++)
48487    if (XOR (islower (i), ISLOWER (i))
48488	|| toupper (i) != TOUPPER (i))
48489      return 2;
48490  return 0;
48491}
48492_ACEOF
48493if ac_fn_cxx_try_run "$LINENO"; then :
48494
48495else
48496  ac_cv_header_stdc=no
48497fi
48498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48499  conftest.$ac_objext conftest.beam conftest.$ac_ext
48500fi
48501
48502fi
48503fi
48504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48505$as_echo "$ac_cv_header_stdc" >&6; }
48506if test $ac_cv_header_stdc = yes; then
48507
48508$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48509
48510fi
48511
48512# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48513for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48514		  inttypes.h stdint.h unistd.h
48515do :
48516  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48517ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48518"
48519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48520  cat >>confdefs.h <<_ACEOF
48521#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48522_ACEOF
48523
48524fi
48525
48526done
48527
48528
48529
48530  ###############################################################################
48531  #
48532  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48533  # (The JVM can use 32 or 64 bit Java pointers but that decision
48534  # is made at runtime.)
48535  #
48536
48537  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48538    # Always specify -m flag on Solaris
48539    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48540
48541  # When we add flags to the "official" CFLAGS etc, we need to
48542  # keep track of these additions in ADDED_CFLAGS etc. These
48543  # will later be checked to make sure only controlled additions
48544  # have been made to CFLAGS etc.
48545  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48546  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48547  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48548
48549  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48550  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48551  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48552
48553  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48554  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48555  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48556
48557  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48558  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48559  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48560
48561  elif test "x$COMPILE_TYPE" = xreduced; then
48562    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48563      # Specify -m if running reduced on unix platforms
48564
48565  # When we add flags to the "official" CFLAGS etc, we need to
48566  # keep track of these additions in ADDED_CFLAGS etc. These
48567  # will later be checked to make sure only controlled additions
48568  # have been made to CFLAGS etc.
48569  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48570  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48571  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48572
48573  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48574  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48575  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48576
48577  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48578  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48579  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48580
48581  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48582  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48583  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48584
48585    fi
48586  fi
48587  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48588    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48589    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48590    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48591  fi
48592
48593  # Make compilation sanity check
48594  for ac_header in stdio.h
48595do :
48596  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48597if test "x$ac_cv_header_stdio_h" = xyes; then :
48598  cat >>confdefs.h <<_ACEOF
48599#define HAVE_STDIO_H 1
48600_ACEOF
48601
48602else
48603
48604    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48605$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48606    if test "x$COMPILE_TYPE" = xreduced; then
48607
48608  # Print a helpful message on how to acquire the necessary build dependency.
48609  # reduced is the help tag: freetype, cups, alsa etc
48610  MISSING_DEPENDENCY=reduced
48611
48612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48613    cygwin_help $MISSING_DEPENDENCY
48614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48615    msys_help $MISSING_DEPENDENCY
48616  else
48617    PKGHANDLER_COMMAND=
48618
48619    case $PKGHANDLER in
48620      apt-get)
48621        apt_help     $MISSING_DEPENDENCY ;;
48622      yum)
48623        yum_help     $MISSING_DEPENDENCY ;;
48624      port)
48625        port_help    $MISSING_DEPENDENCY ;;
48626      pkgutil)
48627        pkgutil_help $MISSING_DEPENDENCY ;;
48628      pkgadd)
48629        pkgadd_help  $MISSING_DEPENDENCY ;;
48630    esac
48631
48632    if test "x$PKGHANDLER_COMMAND" != x; then
48633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48634    fi
48635  fi
48636
48637      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48638$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48639    elif test "x$COMPILE_TYPE" = xcross; then
48640      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48641$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48642    fi
48643    as_fn_error $? "Cannot continue." "$LINENO" 5
48644
48645fi
48646
48647done
48648
48649
48650  # The cast to long int works around a bug in the HP C Compiler
48651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48653# This bug is HP SR number 8606223364.
48654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48655$as_echo_n "checking size of int *... " >&6; }
48656if ${ac_cv_sizeof_int_p+:} false; then :
48657  $as_echo_n "(cached) " >&6
48658else
48659  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48660
48661else
48662  if test "$ac_cv_type_int_p" = yes; then
48663     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48665as_fn_error 77 "cannot compute sizeof (int *)
48666See \`config.log' for more details" "$LINENO" 5; }
48667   else
48668     ac_cv_sizeof_int_p=0
48669   fi
48670fi
48671
48672fi
48673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48674$as_echo "$ac_cv_sizeof_int_p" >&6; }
48675
48676
48677
48678cat >>confdefs.h <<_ACEOF
48679#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48680_ACEOF
48681
48682
48683
48684  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48685  if test "x$ac_cv_sizeof_int_p" = x; then
48686    # The test failed, lets stick to the assumed value.
48687    { $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
48688$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48689  else
48690    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48691
48692    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48693      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48694      # Let's try to implicitely set the compilers target architecture and retry the test
48695      { $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
48696$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;}
48697      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48698$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48699
48700  # When we add flags to the "official" CFLAGS etc, we need to
48701  # keep track of these additions in ADDED_CFLAGS etc. These
48702  # will later be checked to make sure only controlled additions
48703  # have been made to CFLAGS etc.
48704  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48705  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48706  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48707
48708  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48709  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48710  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48711
48712  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48713  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48714  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48715
48716  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48717  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48718  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48719
48720
48721      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48722      unset ac_cv_sizeof_int_p
48723      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48724      cat >>confdefs.h <<_ACEOF
48725#undef SIZEOF_INT_P
48726_ACEOF
48727
48728      # The cast to long int works around a bug in the HP C Compiler
48729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48731# This bug is HP SR number 8606223364.
48732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48733$as_echo_n "checking size of int *... " >&6; }
48734if ${ac_cv_sizeof_int_p+:} false; then :
48735  $as_echo_n "(cached) " >&6
48736else
48737  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48738
48739else
48740  if test "$ac_cv_type_int_p" = yes; then
48741     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48743as_fn_error 77 "cannot compute sizeof (int *)
48744See \`config.log' for more details" "$LINENO" 5; }
48745   else
48746     ac_cv_sizeof_int_p=0
48747   fi
48748fi
48749
48750fi
48751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48752$as_echo "$ac_cv_sizeof_int_p" >&6; }
48753
48754
48755
48756cat >>confdefs.h <<_ACEOF
48757#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48758_ACEOF
48759
48760
48761
48762      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48763
48764      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48765        { $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
48766$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;}
48767        if test "x$COMPILE_TYPE" = xreduced; then
48768
48769  # Print a helpful message on how to acquire the necessary build dependency.
48770  # reduced is the help tag: freetype, cups, alsa etc
48771  MISSING_DEPENDENCY=reduced
48772
48773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48774    cygwin_help $MISSING_DEPENDENCY
48775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48776    msys_help $MISSING_DEPENDENCY
48777  else
48778    PKGHANDLER_COMMAND=
48779
48780    case $PKGHANDLER in
48781      apt-get)
48782        apt_help     $MISSING_DEPENDENCY ;;
48783      yum)
48784        yum_help     $MISSING_DEPENDENCY ;;
48785      port)
48786        port_help    $MISSING_DEPENDENCY ;;
48787      pkgutil)
48788        pkgutil_help $MISSING_DEPENDENCY ;;
48789      pkgadd)
48790        pkgadd_help  $MISSING_DEPENDENCY ;;
48791    esac
48792
48793    if test "x$PKGHANDLER_COMMAND" != x; then
48794      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48795    fi
48796  fi
48797
48798          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48799$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48800        elif test "x$COMPILE_TYPE" = xcross; then
48801          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48802$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48803        fi
48804        as_fn_error $? "Cannot continue." "$LINENO" 5
48805      fi
48806    fi
48807  fi
48808
48809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48810$as_echo_n "checking for target address size... " >&6; }
48811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48812$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48813
48814
48815  ###############################################################################
48816  #
48817  # Is the target little of big endian?
48818  #
48819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48820$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48821if ${ac_cv_c_bigendian+:} false; then :
48822  $as_echo_n "(cached) " >&6
48823else
48824  ac_cv_c_bigendian=unknown
48825    # See if we're dealing with a universal compiler.
48826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48827/* end confdefs.h.  */
48828#ifndef __APPLE_CC__
48829	       not a universal capable compiler
48830	     #endif
48831	     typedef int dummy;
48832
48833_ACEOF
48834if ac_fn_cxx_try_compile "$LINENO"; then :
48835
48836	# Check for potential -arch flags.  It is not universal unless
48837	# there are at least two -arch flags with different values.
48838	ac_arch=
48839	ac_prev=
48840	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48841	 if test -n "$ac_prev"; then
48842	   case $ac_word in
48843	     i?86 | x86_64 | ppc | ppc64)
48844	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48845		 ac_arch=$ac_word
48846	       else
48847		 ac_cv_c_bigendian=universal
48848		 break
48849	       fi
48850	       ;;
48851	   esac
48852	   ac_prev=
48853	 elif test "x$ac_word" = "x-arch"; then
48854	   ac_prev=arch
48855	 fi
48856       done
48857fi
48858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48859    if test $ac_cv_c_bigendian = unknown; then
48860      # See if sys/param.h defines the BYTE_ORDER macro.
48861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48862/* end confdefs.h.  */
48863#include <sys/types.h>
48864	     #include <sys/param.h>
48865
48866int
48867main ()
48868{
48869#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48870		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48871		     && LITTLE_ENDIAN)
48872	      bogus endian macros
48873	     #endif
48874
48875  ;
48876  return 0;
48877}
48878_ACEOF
48879if ac_fn_cxx_try_compile "$LINENO"; then :
48880  # It does; now see whether it defined to BIG_ENDIAN or not.
48881	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48882/* end confdefs.h.  */
48883#include <sys/types.h>
48884		#include <sys/param.h>
48885
48886int
48887main ()
48888{
48889#if BYTE_ORDER != BIG_ENDIAN
48890		 not big endian
48891		#endif
48892
48893  ;
48894  return 0;
48895}
48896_ACEOF
48897if ac_fn_cxx_try_compile "$LINENO"; then :
48898  ac_cv_c_bigendian=yes
48899else
48900  ac_cv_c_bigendian=no
48901fi
48902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48903fi
48904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48905    fi
48906    if test $ac_cv_c_bigendian = unknown; then
48907      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48908      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48909/* end confdefs.h.  */
48910#include <limits.h>
48911
48912int
48913main ()
48914{
48915#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48916	      bogus endian macros
48917	     #endif
48918
48919  ;
48920  return 0;
48921}
48922_ACEOF
48923if ac_fn_cxx_try_compile "$LINENO"; then :
48924  # It does; now see whether it defined to _BIG_ENDIAN or not.
48925	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48926/* end confdefs.h.  */
48927#include <limits.h>
48928
48929int
48930main ()
48931{
48932#ifndef _BIG_ENDIAN
48933		 not big endian
48934		#endif
48935
48936  ;
48937  return 0;
48938}
48939_ACEOF
48940if ac_fn_cxx_try_compile "$LINENO"; then :
48941  ac_cv_c_bigendian=yes
48942else
48943  ac_cv_c_bigendian=no
48944fi
48945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48946fi
48947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48948    fi
48949    if test $ac_cv_c_bigendian = unknown; then
48950      # Compile a test program.
48951      if test "$cross_compiling" = yes; then :
48952  # Try to guess by grepping values from an object file.
48953	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48954/* end confdefs.h.  */
48955short int ascii_mm[] =
48956		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48957		short int ascii_ii[] =
48958		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48959		int use_ascii (int i) {
48960		  return ascii_mm[i] + ascii_ii[i];
48961		}
48962		short int ebcdic_ii[] =
48963		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48964		short int ebcdic_mm[] =
48965		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48966		int use_ebcdic (int i) {
48967		  return ebcdic_mm[i] + ebcdic_ii[i];
48968		}
48969		extern int foo;
48970
48971int
48972main ()
48973{
48974return use_ascii (foo) == use_ebcdic (foo);
48975  ;
48976  return 0;
48977}
48978_ACEOF
48979if ac_fn_cxx_try_compile "$LINENO"; then :
48980  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48981	      ac_cv_c_bigendian=yes
48982	    fi
48983	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48984	      if test "$ac_cv_c_bigendian" = unknown; then
48985		ac_cv_c_bigendian=no
48986	      else
48987		# finding both strings is unlikely to happen, but who knows?
48988		ac_cv_c_bigendian=unknown
48989	      fi
48990	    fi
48991fi
48992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48993else
48994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48995/* end confdefs.h.  */
48996$ac_includes_default
48997int
48998main ()
48999{
49000
49001	     /* Are we little or big endian?  From Harbison&Steele.  */
49002	     union
49003	     {
49004	       long int l;
49005	       char c[sizeof (long int)];
49006	     } u;
49007	     u.l = 1;
49008	     return u.c[sizeof (long int) - 1] == 1;
49009
49010  ;
49011  return 0;
49012}
49013_ACEOF
49014if ac_fn_cxx_try_run "$LINENO"; then :
49015  ac_cv_c_bigendian=no
49016else
49017  ac_cv_c_bigendian=yes
49018fi
49019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49020  conftest.$ac_objext conftest.beam conftest.$ac_ext
49021fi
49022
49023    fi
49024fi
49025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49026$as_echo "$ac_cv_c_bigendian" >&6; }
49027 case $ac_cv_c_bigendian in #(
49028   yes)
49029     ENDIAN="big";; #(
49030   no)
49031     ENDIAN="little" ;; #(
49032   universal)
49033     ENDIAN="universal_endianness"
49034     ;; #(
49035   *)
49036     ENDIAN="unknown" ;;
49037 esac
49038
49039
49040  if test "x$ENDIAN" = xuniversal_endianness; then
49041    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49042  fi
49043  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49044    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
49045  fi
49046
49047
49048# Configure flags for the tools
49049
49050  ###############################################################################
49051  #
49052  # How to compile shared libraries.
49053  #
49054
49055  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49056    PICFLAG="-fPIC"
49057    C_FLAG_REORDER=''
49058    CXX_FLAG_REORDER=''
49059
49060    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49061      # Linking is different on MacOSX
49062      if test "x$STATIC_BUILD" = xtrue; then
49063        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49064      else
49065        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49066        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49067      fi
49068      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49069      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49070      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49071      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49072    else
49073      # Default works for linux, might work on other platforms as well.
49074      SHARED_LIBRARY_FLAGS='-shared'
49075      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49076      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49077      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49078      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49079    fi
49080  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49081    C_FLAG_REORDER=''
49082    CXX_FLAG_REORDER=''
49083
49084    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49085      # Linking is different on MacOSX
49086      PICFLAG=''
49087      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49088      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49089      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49090      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49091      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49092
49093      if test "x$STATIC_BUILD" = xfalse; then
49094        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49095      fi
49096    else
49097      # Default works for linux, might work on other platforms as well.
49098      PICFLAG='-fPIC'
49099      SHARED_LIBRARY_FLAGS='-shared'
49100      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49101      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49102      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49103      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49104    fi
49105  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49106    PICFLAG="-KPIC"
49107    C_FLAG_REORDER='-xF'
49108    CXX_FLAG_REORDER='-xF'
49109    SHARED_LIBRARY_FLAGS="-G"
49110    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49111    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49112    SET_SHARED_LIBRARY_NAME='-h $1'
49113    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49114  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49115    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49116    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49117    # will have to patch this single instruction with a call to some out-of-order code which
49118    # does the load from the TOC. This is of course slow. But in that case we also would have
49119    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49120    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49121    # can be patched directly by the linker and does not require a jump to out-of-order code.
49122    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49123    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49124    # loads for accessing a global variable). But there are rumors that this may be seen as a
49125    # 'performance feature' because of improved code locality of the symbols used in a
49126    # compilation unit.
49127    PICFLAG="-qpic"
49128    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49129    C_FLAG_REORDER=''
49130    CXX_FLAG_REORDER=''
49131    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49132    SET_EXECUTABLE_ORIGIN=""
49133    SET_SHARED_LIBRARY_ORIGIN=''
49134    SET_SHARED_LIBRARY_NAME=''
49135    SET_SHARED_LIBRARY_MAPFILE=''
49136  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49137    PICFLAG=""
49138    C_FLAG_REORDER=''
49139    CXX_FLAG_REORDER=''
49140    SHARED_LIBRARY_FLAGS="-dll"
49141    SET_EXECUTABLE_ORIGIN=''
49142    SET_SHARED_LIBRARY_ORIGIN=''
49143    SET_SHARED_LIBRARY_NAME=''
49144    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49145  fi
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155  # The (cross) compiler is now configured, we can now test capabilities
49156  # of the target platform.
49157
49158
49159
49160  ###############################################################################
49161  #
49162  # Setup the opt flags for different compilers
49163  # and different operating systems.
49164  #
49165
49166  # FIXME: this was indirectly the old default, but just inherited.
49167  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49168  #   C_FLAG_DEPS="-MMD -MF"
49169  # fi
49170
49171  # Generate make dependency files
49172  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49173    C_FLAG_DEPS="-MMD -MF"
49174  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49175    C_FLAG_DEPS="-MMD -MF"
49176  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49177    C_FLAG_DEPS="-xMMD -xMF"
49178  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49179    C_FLAG_DEPS="-qmakedep=gcc -MF"
49180  fi
49181  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49182
49183
49184
49185  # Debug symbols
49186  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49187    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49188      # reduce from default "-g2" option to save space
49189      CFLAGS_DEBUG_SYMBOLS="-g1"
49190      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49191    else
49192      CFLAGS_DEBUG_SYMBOLS="-g"
49193      CXXFLAGS_DEBUG_SYMBOLS="-g"
49194    fi
49195  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49196    CFLAGS_DEBUG_SYMBOLS="-g"
49197    CXXFLAGS_DEBUG_SYMBOLS="-g"
49198  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49199    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49200    # -g0 enables debug symbols without disabling inlining.
49201    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49202  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49203    CFLAGS_DEBUG_SYMBOLS="-g"
49204    CXXFLAGS_DEBUG_SYMBOLS="-g"
49205  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49206    CFLAGS_DEBUG_SYMBOLS="-Zi"
49207    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49208  fi
49209
49210
49211
49212  # Debug symbols for JVM_CFLAGS
49213  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49214    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49215    if test "x$DEBUG_LEVEL" = xslowdebug; then
49216      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49217    else
49218      # -g0 does not disable inlining, which -g does.
49219      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49220    fi
49221  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49222    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49223  else
49224    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49225  fi
49226
49227
49228  # bounds, memory and behavior checking options
49229  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49230    case $DEBUG_LEVEL in
49231    release )
49232      # no adjustment
49233      ;;
49234    fastdebug )
49235      # no adjustment
49236      ;;
49237    slowdebug )
49238      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49239      # get's added conditionally on whether we produce debug symbols or not.
49240      # This is most likely not really correct.
49241
49242      # Add runtime stack smashing and undefined behavior checks.
49243      # Not all versions of gcc support -fstack-protector
49244      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287    # Execute function body
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
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336    # Execute function body
49337
49338  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49339$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49340  supports=yes
49341
49342  saved_cflags="$CFLAGS"
49343  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49344  ac_ext=c
49345ac_cpp='$CPP $CPPFLAGS'
49346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49348ac_compiler_gnu=$ac_cv_c_compiler_gnu
49349
49350  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49351/* end confdefs.h.  */
49352int i;
49353_ACEOF
49354if ac_fn_c_try_compile "$LINENO"; then :
49355
49356else
49357  supports=no
49358fi
49359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49360  ac_ext=cpp
49361ac_cpp='$CXXCPP $CPPFLAGS'
49362ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49363ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49364ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49365
49366  CFLAGS="$saved_cflags"
49367
49368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49369$as_echo "$supports" >&6; }
49370  if test "x$supports" = "xyes" ; then
49371    :
49372    C_COMP_SUPPORTS="yes"
49373  else
49374    :
49375    C_COMP_SUPPORTS="no"
49376  fi
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436    # Execute function body
49437
49438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49439$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49440  supports=yes
49441
49442  saved_cxxflags="$CXXFLAGS"
49443  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49444  ac_ext=cpp
49445ac_cpp='$CXXCPP $CPPFLAGS'
49446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49449
49450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49451/* end confdefs.h.  */
49452int i;
49453_ACEOF
49454if ac_fn_cxx_try_compile "$LINENO"; then :
49455
49456else
49457  supports=no
49458fi
49459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49460  ac_ext=cpp
49461ac_cpp='$CXXCPP $CPPFLAGS'
49462ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49463ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49464ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49465
49466  CXXFLAGS="$saved_cxxflags"
49467
49468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49469$as_echo "$supports" >&6; }
49470  if test "x$supports" = "xyes" ; then
49471    :
49472    CXX_COMP_SUPPORTS="yes"
49473  else
49474    :
49475    CXX_COMP_SUPPORTS="no"
49476  fi
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49491$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49492  supports=no
49493  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49494
49495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49496$as_echo "$supports" >&6; }
49497  if test "x$supports" = "xyes" ; then
49498    :
49499
49500  else
49501    :
49502    STACK_PROTECTOR_CFLAG=""
49503  fi
49504
49505
49506
49507
49508
49509
49510
49511      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49512      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49513      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49514        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49515      fi
49516      ;;
49517    esac
49518  fi
49519
49520  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49521    if test "x$DEBUG_LEVEL" != xrelease; then
49522      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49523        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49524      fi
49525    fi
49526  fi
49527
49528  # Optimization levels
49529  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49530    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49531
49532    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49533      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49534      C_O_FLAG_HIGHEST_JVM="-xO4"
49535      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49536      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49537      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49538      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49539      C_O_FLAG_DEBUG_JVM=""
49540      C_O_FLAG_NONE="-xregs=no%frameptr"
49541      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49542      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49543      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49544      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49545      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49546      CXX_O_FLAG_DEBUG_JVM=""
49547      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49548      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49549        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49550        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49551      fi
49552    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49553      C_O_FLAG_HIGHEST_JVM="-xO4"
49554      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49555      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49556      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49557      C_O_FLAG_DEBUG=""
49558      C_O_FLAG_DEBUG_JVM=""
49559      C_O_FLAG_NONE=""
49560      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49561      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49562      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49563      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49564      CXX_O_FLAG_DEBUG=""
49565      CXX_O_FLAG_DEBUG_JVM=""
49566      CXX_O_FLAG_NONE=""
49567    fi
49568  else
49569    # The remaining toolchains share opt flags between CC and CXX;
49570    # setup for C and duplicate afterwards.
49571    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49572      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49573        # On MacOSX we optimize for size, something
49574        # we should do for all platforms?
49575        C_O_FLAG_HIGHEST_JVM="-Os"
49576        C_O_FLAG_HIGHEST="-Os"
49577        C_O_FLAG_HI="-Os"
49578        C_O_FLAG_NORM="-Os"
49579        C_O_FLAG_SIZE="-Os"
49580      else
49581        C_O_FLAG_HIGHEST_JVM="-O3"
49582        C_O_FLAG_HIGHEST="-O3"
49583        C_O_FLAG_HI="-O3"
49584        C_O_FLAG_NORM="-O2"
49585        C_O_FLAG_SIZE="-Os"
49586      fi
49587      C_O_FLAG_DEBUG="-O0"
49588      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49589        C_O_FLAG_DEBUG_JVM=""
49590      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49591        C_O_FLAG_DEBUG_JVM="-O0"
49592      fi
49593      C_O_FLAG_NONE="-O0"
49594    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49595      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49596        # On MacOSX we optimize for size, something
49597        # we should do for all platforms?
49598        C_O_FLAG_HIGHEST_JVM="-Os"
49599        C_O_FLAG_HIGHEST="-Os"
49600        C_O_FLAG_HI="-Os"
49601        C_O_FLAG_NORM="-Os"
49602        C_O_FLAG_SIZE="-Os"
49603      else
49604        C_O_FLAG_HIGHEST_JVM="-O3"
49605        C_O_FLAG_HIGHEST="-O3"
49606        C_O_FLAG_HI="-O3"
49607        C_O_FLAG_NORM="-O2"
49608        C_O_FLAG_SIZE="-Os"
49609      fi
49610      C_O_FLAG_DEBUG="-O0"
49611      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49612        C_O_FLAG_DEBUG_JVM=""
49613      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49614        C_O_FLAG_DEBUG_JVM="-O0"
49615      fi
49616      C_O_FLAG_NONE="-O0"
49617    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49618      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49619      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49620      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49621      C_O_FLAG_NORM="-O2"
49622      C_O_FLAG_DEBUG="-qnoopt"
49623      # FIXME: Value below not verified.
49624      C_O_FLAG_DEBUG_JVM=""
49625      C_O_FLAG_NONE="-qnoopt"
49626    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49627      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49628      C_O_FLAG_HIGHEST="-O2"
49629      C_O_FLAG_HI="-O1"
49630      C_O_FLAG_NORM="-O1"
49631      C_O_FLAG_DEBUG="-Od"
49632      C_O_FLAG_DEBUG_JVM=""
49633      C_O_FLAG_NONE="-Od"
49634      C_O_FLAG_SIZE="-Os"
49635    fi
49636    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49637    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49638    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49639    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49640    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49641    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49642    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49643    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49644  fi
49645
49646  # Adjust optimization flags according to debug level.
49647  case $DEBUG_LEVEL in
49648    release )
49649      # no adjustment
49650      ;;
49651    fastdebug )
49652      # Not quite so much optimization
49653      C_O_FLAG_HI="$C_O_FLAG_NORM"
49654      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49655      ;;
49656    slowdebug )
49657      # Disable optimization
49658      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49659      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49660      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49661      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49662      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49663      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49664      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49665      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49666      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49667      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49668      ;;
49669  esac
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689  # Special extras...
49690  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49691    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49692      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49693      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49694    fi
49695    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49696    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49697  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49698    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49699    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49700  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49701    CXXSTD_CXXFLAG="-std=gnu++98"
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744    # Execute function body
49745
49746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49747$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49748  supports=yes
49749
49750  saved_cxxflags="$CXXFLAGS"
49751  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49752  ac_ext=cpp
49753ac_cpp='$CXXCPP $CPPFLAGS'
49754ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49755ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49756ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49757
49758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49759/* end confdefs.h.  */
49760int i;
49761_ACEOF
49762if ac_fn_cxx_try_compile "$LINENO"; then :
49763
49764else
49765  supports=no
49766fi
49767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49768  ac_ext=cpp
49769ac_cpp='$CXXCPP $CPPFLAGS'
49770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49773
49774  CXXFLAGS="$saved_cxxflags"
49775
49776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49777$as_echo "$supports" >&6; }
49778  if test "x$supports" = "xyes" ; then
49779    :
49780
49781  else
49782    :
49783    CXXSTD_CXXFLAG=""
49784  fi
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49798    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49799
49800  fi
49801  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49802    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49803    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49804  fi
49805
49806  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49807    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49808    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49809  fi
49810
49811  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49812  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49813  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49814
49815  ###############################################################################
49816  #
49817  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49818  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49819  #
49820
49821  # Setup compiler/platform specific flags into
49822  #    CFLAGS_JDK    - C Compiler flags
49823  #    CXXFLAGS_JDK  - C++ Compiler flags
49824  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49825  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49826    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49827    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49828    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49829    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49830      # Force compatibility with i586 on 32 bit intel platforms.
49831      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49832      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49833    fi
49834    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49835        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49836    case $OPENJDK_TARGET_CPU_ARCH in
49837      arm )
49838        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49839        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49840        ;;
49841      ppc )
49842        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49843        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49844        ;;
49845      s390 )
49846        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
49847        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49848        ;;
49849      * )
49850        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49851        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49852        ;;
49853    esac
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908    # Execute function body
49909
49910  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49911  REFERENCE_VERSION=6
49912
49913  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49914    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49915  fi
49916
49917  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49918    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49919  fi
49920
49921  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49922  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49923
49924  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49925    :
49926
49927  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49928  # runs afoul of the more aggressive versions of these optimisations.
49929  # Notably, value range propagation now assumes that the this pointer of C++
49930  # member functions is non-null.
49931  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49932        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49933        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49934$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49935  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49936  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49937
49938  else
49939    :
49940
49941  fi
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49957    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49958
49959    # Restrict the debug information created by Clang to avoid
49960    # too big object files and speed the build up a little bit
49961    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49962    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49963    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49964      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49965        # Force compatibility with i586 on 32 bit intel platforms.
49966        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49967        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49968      fi
49969      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49970      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49971          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49972      case $OPENJDK_TARGET_CPU_ARCH in
49973        ppc )
49974          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49975          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49976          ;;
49977        * )
49978          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49979          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49980          ;;
49981      esac
49982    fi
49983  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49984    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49985    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49986    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49987      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49988    fi
49989
49990    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49991    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49992  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49993    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49994    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49995    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49996  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49997    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49998        -MD -Zc:wchar_t- -W3 -wd4800 \
49999        -DWIN32_LEAN_AND_MEAN \
50000        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50001        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50002        -DWIN32 -DIAL"
50003    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50004      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50005    else
50006      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50007    fi
50008    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50009    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50010    # studio.
50011    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50012      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50013      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50014      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50015    fi
50016  fi
50017
50018  ###############################################################################
50019
50020  # Adjust flags according to debug level.
50021  case $DEBUG_LEVEL in
50022    fastdebug | slowdebug )
50023      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50024      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50025      ;;
50026    release )
50027      ;;
50028    * )
50029      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50030      ;;
50031  esac
50032
50033  # Set some common defines. These works for all compilers, but assume
50034  # -D is universally accepted.
50035
50036  # Setup endianness
50037  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50038    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50039    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50040    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50041    #   Note: -Dmacro         is the same as    #define macro 1
50042    #         -Dmacro=        is the same as    #define macro
50043    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50044      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50045    else
50046      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50047    fi
50048  else
50049    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50050    # are defined in the system?
50051    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50052      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50053    else
50054      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50055    fi
50056  fi
50057
50058  # Setup target OS define. Use OS target name but in upper case.
50059  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50060  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50061
50062  # Setup target CPU
50063  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50064      $OPENJDK_TARGET_ADD_LP64 \
50065      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50066
50067  # Setup debug/release defines
50068  if test "x$DEBUG_LEVEL" = xrelease; then
50069    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50070    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50071      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50072    fi
50073  else
50074    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50075  fi
50076
50077  # Set some additional per-OS defines.
50078  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50079    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50080    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50081        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50082  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50083    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50084    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50085        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50086  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50087    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50088    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50089    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50090    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50091        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50092        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50093        -fno-omit-frame-pointer"
50094  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50095    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50096    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50097    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50098        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50099        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50100  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50101    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50102  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50103    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50104    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50105  fi
50106
50107  # Set some additional per-CPU defines.
50108  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50109    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50110  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50111    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50112  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50113    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50114      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50115      # fixes `relocation truncated to fit' error for gcc 4.1.
50116      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50117      # Use ppc64 instructions, but schedule for power5
50118      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50119    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50120      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50121    fi
50122  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50123    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50124      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50125      # Little endian machine uses ELFv2 ABI.
50126      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50127      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50128      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50129    fi
50130  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50131    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50132      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50133    fi
50134  fi
50135
50136  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50137    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50138  fi
50139
50140  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50141    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50142      # Solaris does not have _LP64=1 in the old build.
50143      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50144      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50145    fi
50146  fi
50147
50148  # Set JVM_CFLAGS warning handling
50149  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50150    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50151        -Wunused-value -Woverloaded-virtual"
50152
50153    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184
50185
50186
50187
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208    # Execute function body
50209
50210  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50211  REFERENCE_VERSION=4.8
50212
50213  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50214    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50215  fi
50216
50217  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50218    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50219  fi
50220
50221  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50222  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50223
50224  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50225    :
50226
50227            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50228            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50229
50230
50231  else
50232    :
50233
50234  fi
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249    fi
50250    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50251      # Non-zero builds have stricter warnings
50252      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50253    else
50254      if test "x$TOOLCHAIN_TYPE" = xclang; then
50255        # Some versions of llvm do not like -Wundef
50256        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50257      fi
50258    fi
50259  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50260    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50261        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50262  fi
50263
50264  # Additional macosx handling
50265  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50266    # Setting these parameters makes it an error to link to macosx APIs that are
50267    # newer than the given OS version and makes the linked binaries compatible
50268    # even if built on a newer version of the OS.
50269    # The expected format is X.Y.Z
50270    MACOSX_VERSION_MIN=10.7.0
50271
50272
50273    # The macro takes the version with no dots, ex: 1070
50274    # Let the flags variables get resolved in make for easier override on make
50275    # command line.
50276    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50277    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50278  fi
50279
50280  # Setup some hard coded includes
50281  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50282      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50283      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50284      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50285      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50286      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50287      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50288
50289  # The shared libraries are compiled using the picflag.
50290  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50291      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50292  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50293      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50294
50295  # Executable flags
50296  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50297  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50298
50299
50300
50301
50302
50303
50304  # Setup LDFLAGS et al.
50305  #
50306
50307  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50308    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50309    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50310    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50311    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50312      LDFLAGS_SAFESH="-safeseh"
50313      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50314      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50315      # NOTE: Old build added -machine. Probably not needed.
50316      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50317    else
50318      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50319    fi
50320  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50321      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50322      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50323        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50324        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50325    fi
50326  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50327    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50328    # We have previously set HAS_GNU_HASH if this is the case
50329    if test -n "$HAS_GNU_HASH"; then
50330      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50331      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50332      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50333    fi
50334      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50335        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50336    fi
50337    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50338      # And since we now know that the linker is gnu, then add -z defs, to forbid
50339      # undefined symbols in object files.
50340      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50341      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50342      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50343      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50344      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50345      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50346        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50347      fi
50348      case $DEBUG_LEVEL in
50349        release )
50350          # tell linker to optimize libraries.
50351          # Should this be supplied to the OSS linker as well?
50352          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50353          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50354          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50355          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50356            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50357          fi
50358          ;;
50359        slowdebug )
50360          # Hotspot always let the linker optimize
50361          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50362          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50363            # do relocations at load
50364            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50365            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50366            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50367          fi
50368          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50369            # mark relocations read only
50370            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50371            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50372            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50373          fi
50374          ;;
50375        fastdebug )
50376          # Hotspot always let the linker optimize
50377          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50378          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50379            # mark relocations read only
50380            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50381            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50382            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50383          fi
50384          ;;
50385        * )
50386          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50387          ;;
50388        esac
50389    fi
50390  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50391    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50392    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50393    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50394    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50395    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50396    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50397      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50398    fi
50399  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50400    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50401    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50402    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50403  fi
50404
50405  # Customize LDFLAGS for executables
50406
50407  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50408
50409  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50410    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50411      LDFLAGS_STACK_SIZE=1048576
50412    else
50413      LDFLAGS_STACK_SIZE=327680
50414    fi
50415    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50416  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50417    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50418  fi
50419
50420  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50421
50422  # Customize LDFLAGS for libs
50423  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50424
50425  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50426  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50427    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50428        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50429    JDKLIB_LIBS=""
50430  else
50431    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50432        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50433
50434    if test "xTARGET" = "xTARGET"; then
50435    # On some platforms (mac) the linker warns about non existing -L dirs.
50436    # Add server first if available. Linking aginst client does not always produce the same results.
50437      # Only add client/minimal dir if client/minimal is being built.
50438    # Default to server for other variants.
50439      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50440        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50441      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50442        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50443      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50444        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50445    else
50446        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50447    fi
50448    elif test "xTARGET" = "xBUILD"; then
50449      # When building a buildjdk, it's always only the server variant
50450      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50451          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50452    fi
50453
50454    JDKLIB_LIBS="-ljava -ljvm"
50455    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50456      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50457    fi
50458
50459  fi
50460
50461LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50462
50463  # Set JVM_LIBS (per os)
50464  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50465    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50466  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50467    # FIXME: This hard-coded path is not really proper.
50468    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50469      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50470    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50471      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50472    fi
50473    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50474        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50475  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50476    JVM_LIBS="$JVM_LIBS -lm"
50477  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50478    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50479  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50480    JVM_LIBS="$JVM_LIBS -lm"
50481  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50482    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50483        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50484        wsock32.lib winmm.lib version.lib psapi.lib"
50485    fi
50486
50487  # Set JVM_ASFLAGS
50488  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50489    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50490      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50491    fi
50492  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50493    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50494  fi
50495
50496  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50497
50498
50499
50500
50501
50502
50503
50504
50505
50506
50507
50508
50509
50510
50511
50512  # Special extras...
50513  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50514    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50515      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50516      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50517    fi
50518    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50519    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50520  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50521    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50522    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50523  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50524    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50525
50526
50527
50528
50529
50530
50531
50532
50533
50534
50535
50536
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552
50553
50554
50555
50556
50557
50558
50559
50560
50561
50562
50563
50564
50565
50566
50567    # Execute function body
50568
50569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50570$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50571  supports=yes
50572
50573  saved_cxxflags="$CXXFLAGS"
50574  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50575  ac_ext=cpp
50576ac_cpp='$CXXCPP $CPPFLAGS'
50577ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50578ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50579ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50580
50581  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50582/* end confdefs.h.  */
50583int i;
50584_ACEOF
50585if ac_fn_cxx_try_compile "$LINENO"; then :
50586
50587else
50588  supports=no
50589fi
50590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50591  ac_ext=cpp
50592ac_cpp='$CXXCPP $CPPFLAGS'
50593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50596
50597  CXXFLAGS="$saved_cxxflags"
50598
50599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50600$as_echo "$supports" >&6; }
50601  if test "x$supports" = "xyes" ; then
50602    :
50603
50604  else
50605    :
50606    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50607  fi
50608
50609
50610
50611
50612
50613
50614
50615
50616
50617
50618
50619
50620    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50621    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50622
50623  fi
50624  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50625    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50626    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50627  fi
50628
50629  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50630    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50631    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50632  fi
50633
50634  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50635  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50636  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50637
50638  ###############################################################################
50639  #
50640  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50641  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50642  #
50643
50644  # Setup compiler/platform specific flags into
50645  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50646  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50647  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50648  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50649    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50650    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50651    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50652    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50653      # Force compatibility with i586 on 32 bit intel platforms.
50654      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50655      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50656    fi
50657    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50658        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50659    case $OPENJDK_BUILD_CPU_ARCH in
50660      arm )
50661        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50662        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50663        ;;
50664      ppc )
50665        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50666        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50667        ;;
50668      s390 )
50669        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50670        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50671        ;;
50672      * )
50673        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50674        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50675        ;;
50676    esac
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
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731    # Execute function body
50732
50733  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50734  REFERENCE_VERSION=6
50735
50736  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50737    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50738  fi
50739
50740  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50741    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50742  fi
50743
50744  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50745  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50746
50747  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50748    :
50749
50750  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50751  # runs afoul of the more aggressive versions of these optimisations.
50752  # Notably, value range propagation now assumes that the this pointer of C++
50753  # member functions is non-null.
50754  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50755        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50756        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50757$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50758  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50759  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50760
50761  else
50762    :
50763
50764  fi
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50780    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50781
50782    # Restrict the debug information created by Clang to avoid
50783    # too big object files and speed the build up a little bit
50784    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50785    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50786    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50787      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50788        # Force compatibility with i586 on 32 bit intel platforms.
50789        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50790        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50791      fi
50792      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50793      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50794          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50795      case $OPENJDK_BUILD_CPU_ARCH in
50796        ppc )
50797          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50798          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50799          ;;
50800        * )
50801          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50802          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50803          ;;
50804      esac
50805    fi
50806  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50807    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50808    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50809    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50810      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50811    fi
50812
50813    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50814    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50815  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50816    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50817    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50818    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50819  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50820    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50821        -MD -Zc:wchar_t- -W3 -wd4800 \
50822        -DWIN32_LEAN_AND_MEAN \
50823        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50824        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50825        -DWIN32 -DIAL"
50826    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50827      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50828    else
50829      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50830    fi
50831    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50832    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50833    # studio.
50834    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50835      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50836      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50837      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50838    fi
50839  fi
50840
50841  ###############################################################################
50842
50843  # Adjust flags according to debug level.
50844  case $DEBUG_LEVEL in
50845    fastdebug | slowdebug )
50846      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50847      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50848      ;;
50849    release )
50850      ;;
50851    * )
50852      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50853      ;;
50854  esac
50855
50856  # Set some common defines. These works for all compilers, but assume
50857  # -D is universally accepted.
50858
50859  # Setup endianness
50860  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50861    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50862    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50863    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50864    #   Note: -Dmacro         is the same as    #define macro 1
50865    #         -Dmacro=        is the same as    #define macro
50866    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50867      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50868    else
50869      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50870    fi
50871  else
50872    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50873    # are defined in the system?
50874    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50875      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50876    else
50877      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50878    fi
50879  fi
50880
50881  # Setup target OS define. Use OS target name but in upper case.
50882  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50883  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50884
50885  # Setup target CPU
50886  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50887      $OPENJDK_BUILD_ADD_LP64 \
50888      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50889
50890  # Setup debug/release defines
50891  if test "x$DEBUG_LEVEL" = xrelease; then
50892    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50893    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50894      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50895    fi
50896  else
50897    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50898  fi
50899
50900  # Set some additional per-OS defines.
50901  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50902    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50903    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50904        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50905  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50906    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50907    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50908        -D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
50909  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50910    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50911    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50912    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50913    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50914        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50915        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50916        -fno-omit-frame-pointer"
50917  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50918    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50919    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50920    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50921        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50922        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50923  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50924    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50925  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50926    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50927    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50928  fi
50929
50930  # Set some additional per-CPU defines.
50931  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50932    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50933  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50934    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50935  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50936    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50937      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50938      # fixes `relocation truncated to fit' error for gcc 4.1.
50939      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50940      # Use ppc64 instructions, but schedule for power5
50941      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50942    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50943      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50944    fi
50945  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50946    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50947      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50948      # Little endian machine uses ELFv2 ABI.
50949      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50950      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50951      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
50952    fi
50953  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
50954    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50955      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
50956    fi
50957  fi
50958
50959  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50960    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50961  fi
50962
50963  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50964    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50965      # Solaris does not have _LP64=1 in the old build.
50966      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50967      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50968    fi
50969  fi
50970
50971  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50972  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50973    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50974        -Wunused-value -Woverloaded-virtual"
50975
50976    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50977
50978
50979
50980
50981
50982
50983
50984
50985
50986
50987
50988
50989
50990
50991
50992
50993
50994
50995
50996
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031    # Execute function body
51032
51033  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51034  REFERENCE_VERSION=4.8
51035
51036  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51037    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51038  fi
51039
51040  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51041    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51042  fi
51043
51044  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51045  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51046
51047  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51048    :
51049
51050            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51051            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51052
51053
51054  else
51055    :
51056
51057  fi
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072    fi
51073    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51074      # Non-zero builds have stricter warnings
51075      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51076    else
51077      if test "x$TOOLCHAIN_TYPE" = xclang; then
51078        # Some versions of llvm do not like -Wundef
51079        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51080      fi
51081    fi
51082  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51083    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51084        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51085  fi
51086
51087  # Additional macosx handling
51088  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51089    # Setting these parameters makes it an error to link to macosx APIs that are
51090    # newer than the given OS version and makes the linked binaries compatible
51091    # even if built on a newer version of the OS.
51092    # The expected format is X.Y.Z
51093    MACOSX_VERSION_MIN=10.7.0
51094
51095
51096    # The macro takes the version with no dots, ex: 1070
51097    # Let the flags variables get resolved in make for easier override on make
51098    # command line.
51099    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)"
51100    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51101  fi
51102
51103  # Setup some hard coded includes
51104  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51105      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51106      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51107      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51108      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51109      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51110      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51111
51112  # The shared libraries are compiled using the picflag.
51113  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51114      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51115  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51116      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51117
51118  # Executable flags
51119  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51120  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51121
51122
51123
51124
51125
51126
51127  # Setup LDFLAGS et al.
51128  #
51129
51130  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51131    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51132    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51133    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51134    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51135      LDFLAGS_SAFESH="-safeseh"
51136      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51137      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51138      # NOTE: Old build added -machine. Probably not needed.
51139      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51140    else
51141      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51142    fi
51143  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51144      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51145      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51146        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51147        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51148    fi
51149  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51150    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51151    # We have previously set HAS_GNU_HASH if this is the case
51152    if test -n "$HAS_GNU_HASH"; then
51153      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51154      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51155      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51156    fi
51157      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51158        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51159    fi
51160    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51161      # And since we now know that the linker is gnu, then add -z defs, to forbid
51162      # undefined symbols in object files.
51163      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51164      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51165      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51166      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51167      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51168      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51169        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51170      fi
51171      case $DEBUG_LEVEL in
51172        release )
51173          # tell linker to optimize libraries.
51174          # Should this be supplied to the OSS linker as well?
51175          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51176          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51177          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51178          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51179            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51180          fi
51181          ;;
51182        slowdebug )
51183          # Hotspot always let the linker optimize
51184          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51185          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51186            # do relocations at load
51187            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51188            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51189            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51190          fi
51191          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51192            # mark relocations read only
51193            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51194            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51195            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51196          fi
51197          ;;
51198        fastdebug )
51199          # Hotspot always let the linker optimize
51200          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51201          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51202            # mark relocations read only
51203            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51204            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51205            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51206          fi
51207          ;;
51208        * )
51209          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51210          ;;
51211        esac
51212    fi
51213  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51214    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51215    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51216    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51217    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51218    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51219    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51220      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51221    fi
51222  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51223    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51224    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51225    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51226  fi
51227
51228  # Customize LDFLAGS for executables
51229
51230  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51231
51232  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51233    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51234      LDFLAGS_STACK_SIZE=1048576
51235    else
51236      LDFLAGS_STACK_SIZE=327680
51237    fi
51238    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51239  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51240    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51241  fi
51242
51243  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51244
51245  # Customize LDFLAGS for libs
51246  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51247
51248  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51249  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51250    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51251        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51252    OPENJDK_BUILD_JDKLIB_LIBS=""
51253  else
51254    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51255        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51256
51257    if test "xBUILD" = "xTARGET"; then
51258    # On some platforms (mac) the linker warns about non existing -L dirs.
51259    # Add server first if available. Linking aginst client does not always produce the same results.
51260      # Only add client/minimal dir if client/minimal is being built.
51261    # Default to server for other variants.
51262      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51263        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51264      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51265        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51266      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51267        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51268    else
51269        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51270    fi
51271    elif test "xBUILD" = "xBUILD"; then
51272      # When building a buildjdk, it's always only the server variant
51273      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51274          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51275    fi
51276
51277    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51278    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51279      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51280    fi
51281
51282  fi
51283
51284OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51285
51286  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51287  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51288    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51289  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51290    # FIXME: This hard-coded path is not really proper.
51291    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51292      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51293    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51294      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51295    fi
51296    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51297        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51298  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51299    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51300  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51301    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51302  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51303    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51304  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51305    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51306        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51307        wsock32.lib winmm.lib version.lib psapi.lib"
51308    fi
51309
51310  # Set OPENJDK_BUILD_JVM_ASFLAGS
51311  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51312    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51313      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51314    fi
51315  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51316    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51317  fi
51318
51319  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335  # Tests are only ever compiled for TARGET
51336  # Flags for compiling test libraries
51337  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51338  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51339
51340  # Flags for compiling test executables
51341  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51342  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51343
51344
51345
51346
51347
51348
51349  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51350  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51351
51352
51353
51354
51355
51356
51357  # Some Zero and Shark settings.
51358  # ZERO_ARCHFLAG tells the compiler which mode to build for
51359  case "${OPENJDK_TARGET_CPU}" in
51360    s390)
51361      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51362      ;;
51363    *)
51364      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51365  esac
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408    # Execute function body
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457    # Execute function body
51458
51459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51460$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51461  supports=yes
51462
51463  saved_cflags="$CFLAGS"
51464  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51465  ac_ext=c
51466ac_cpp='$CPP $CPPFLAGS'
51467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51469ac_compiler_gnu=$ac_cv_c_compiler_gnu
51470
51471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51472/* end confdefs.h.  */
51473int i;
51474_ACEOF
51475if ac_fn_c_try_compile "$LINENO"; then :
51476
51477else
51478  supports=no
51479fi
51480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51481  ac_ext=cpp
51482ac_cpp='$CXXCPP $CPPFLAGS'
51483ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51484ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51485ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51486
51487  CFLAGS="$saved_cflags"
51488
51489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51490$as_echo "$supports" >&6; }
51491  if test "x$supports" = "xyes" ; then
51492    :
51493    C_COMP_SUPPORTS="yes"
51494  else
51495    :
51496    C_COMP_SUPPORTS="no"
51497  fi
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557    # Execute function body
51558
51559  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51560$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51561  supports=yes
51562
51563  saved_cxxflags="$CXXFLAGS"
51564  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51565  ac_ext=cpp
51566ac_cpp='$CXXCPP $CPPFLAGS'
51567ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51568ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51569ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51570
51571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51572/* end confdefs.h.  */
51573int i;
51574_ACEOF
51575if ac_fn_cxx_try_compile "$LINENO"; then :
51576
51577else
51578  supports=no
51579fi
51580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51581  ac_ext=cpp
51582ac_cpp='$CXXCPP $CPPFLAGS'
51583ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51584ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51585ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51586
51587  CXXFLAGS="$saved_cxxflags"
51588
51589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51590$as_echo "$supports" >&6; }
51591  if test "x$supports" = "xyes" ; then
51592    :
51593    CXX_COMP_SUPPORTS="yes"
51594  else
51595    :
51596    CXX_COMP_SUPPORTS="no"
51597  fi
51598
51599
51600
51601
51602
51603
51604
51605
51606
51607
51608
51609
51610
51611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51612$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51613  supports=no
51614  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51615
51616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51617$as_echo "$supports" >&6; }
51618  if test "x$supports" = "xyes" ; then
51619    :
51620
51621  else
51622    :
51623    ZERO_ARCHFLAG=""
51624  fi
51625
51626
51627
51628
51629
51630
51631
51632
51633  # Check that the compiler supports -mX (or -qX on AIX) flags
51634  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682    # Execute function body
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731    # Execute function body
51732
51733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51734$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51735  supports=yes
51736
51737  saved_cflags="$CFLAGS"
51738  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51739  ac_ext=c
51740ac_cpp='$CPP $CPPFLAGS'
51741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51743ac_compiler_gnu=$ac_cv_c_compiler_gnu
51744
51745  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51746/* end confdefs.h.  */
51747int i;
51748_ACEOF
51749if ac_fn_c_try_compile "$LINENO"; then :
51750
51751else
51752  supports=no
51753fi
51754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51755  ac_ext=cpp
51756ac_cpp='$CXXCPP $CPPFLAGS'
51757ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51758ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51759ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51760
51761  CFLAGS="$saved_cflags"
51762
51763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51764$as_echo "$supports" >&6; }
51765  if test "x$supports" = "xyes" ; then
51766    :
51767    C_COMP_SUPPORTS="yes"
51768  else
51769    :
51770    C_COMP_SUPPORTS="no"
51771  fi
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831    # Execute function body
51832
51833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51834$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51835  supports=yes
51836
51837  saved_cxxflags="$CXXFLAGS"
51838  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51839  ac_ext=cpp
51840ac_cpp='$CXXCPP $CPPFLAGS'
51841ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51842ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51843ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51844
51845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51846/* end confdefs.h.  */
51847int i;
51848_ACEOF
51849if ac_fn_cxx_try_compile "$LINENO"; then :
51850
51851else
51852  supports=no
51853fi
51854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51855  ac_ext=cpp
51856ac_cpp='$CXXCPP $CPPFLAGS'
51857ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51858ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51859ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51860
51861  CXXFLAGS="$saved_cxxflags"
51862
51863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51864$as_echo "$supports" >&6; }
51865  if test "x$supports" = "xyes" ; then
51866    :
51867    CXX_COMP_SUPPORTS="yes"
51868  else
51869    :
51870    CXX_COMP_SUPPORTS="no"
51871  fi
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51886$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51887  supports=no
51888  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51889
51890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51891$as_echo "$supports" >&6; }
51892  if test "x$supports" = "xyes" ; then
51893    :
51894    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51895  else
51896    :
51897    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51898  fi
51899
51900
51901
51902
51903
51904
51905
51906
51907  # Check whether --enable-warnings-as-errors was given.
51908if test "${enable_warnings_as_errors+set}" = set; then :
51909  enableval=$enable_warnings_as_errors;
51910fi
51911
51912
51913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51914$as_echo_n "checking if native warnings are errors... " >&6; }
51915  if test "x$enable_warnings_as_errors" = "xyes"; then
51916    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51917$as_echo "yes (explicitely set)" >&6; }
51918    WARNINGS_AS_ERRORS=true
51919  elif test "x$enable_warnings_as_errors" = "xno"; then
51920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51921$as_echo "no" >&6; }
51922    WARNINGS_AS_ERRORS=false
51923  elif test "x$enable_warnings_as_errors" = "x"; then
51924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51925$as_echo "yes (default)" >&6; }
51926    WARNINGS_AS_ERRORS=true
51927  else
51928    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51929  fi
51930
51931  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51932    # Set legacy hotspot variable
51933    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51934  else
51935    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51936  fi
51937
51938
51939
51940
51941  case "${TOOLCHAIN_TYPE}" in
51942    microsoft)
51943      DISABLE_WARNING_PREFIX="-wd"
51944      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51945      ;;
51946    solstudio)
51947      DISABLE_WARNING_PREFIX="-erroff="
51948      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51949      ;;
51950    gcc)
51951      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999    # Execute function body
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 \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52051$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52052  supports=yes
52053
52054  saved_cflags="$CFLAGS"
52055  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52056  ac_ext=c
52057ac_cpp='$CPP $CPPFLAGS'
52058ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52059ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52060ac_compiler_gnu=$ac_cv_c_compiler_gnu
52061
52062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52063/* end confdefs.h.  */
52064int i;
52065_ACEOF
52066if ac_fn_c_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  CFLAGS="$saved_cflags"
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    C_COMP_SUPPORTS="yes"
52085  else
52086    :
52087    C_COMP_SUPPORTS="no"
52088  fi
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106
52107
52108
52109
52110
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148    # Execute function body
52149
52150  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52151$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52152  supports=yes
52153
52154  saved_cxxflags="$CXXFLAGS"
52155  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52156  ac_ext=cpp
52157ac_cpp='$CXXCPP $CPPFLAGS'
52158ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52159ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52160ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52161
52162  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52163/* end confdefs.h.  */
52164int i;
52165_ACEOF
52166if ac_fn_cxx_try_compile "$LINENO"; then :
52167
52168else
52169  supports=no
52170fi
52171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52172  ac_ext=cpp
52173ac_cpp='$CXXCPP $CPPFLAGS'
52174ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52175ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52176ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52177
52178  CXXFLAGS="$saved_cxxflags"
52179
52180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52181$as_echo "$supports" >&6; }
52182  if test "x$supports" = "xyes" ; then
52183    :
52184    CXX_COMP_SUPPORTS="yes"
52185  else
52186    :
52187    CXX_COMP_SUPPORTS="no"
52188  fi
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52203$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52204  supports=no
52205  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52206
52207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52208$as_echo "$supports" >&6; }
52209  if test "x$supports" = "xyes" ; then
52210    :
52211    GCC_CAN_DISABLE_WARNINGS=true
52212  else
52213    :
52214    GCC_CAN_DISABLE_WARNINGS=false
52215
52216  fi
52217
52218
52219
52220
52221
52222
52223      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52224        DISABLE_WARNING_PREFIX="-Wno-"
52225      else
52226        DISABLE_WARNING_PREFIX=
52227      fi
52228      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52229      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52230      # CFLAGS since any target specific flags will likely not work with the
52231      # build compiler
52232      CC_OLD="$CC"
52233      CXX_OLD="$CXX"
52234      CC="$BUILD_CC"
52235      CXX="$BUILD_CXX"
52236      CFLAGS_OLD="$CFLAGS"
52237      CFLAGS=""
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285    # Execute function body
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334    # Execute function body
52335
52336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52337$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52338  supports=yes
52339
52340  saved_cflags="$CFLAGS"
52341  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52342  ac_ext=c
52343ac_cpp='$CPP $CPPFLAGS'
52344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52346ac_compiler_gnu=$ac_cv_c_compiler_gnu
52347
52348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52349/* end confdefs.h.  */
52350int i;
52351_ACEOF
52352if ac_fn_c_try_compile "$LINENO"; then :
52353
52354else
52355  supports=no
52356fi
52357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52358  ac_ext=cpp
52359ac_cpp='$CXXCPP $CPPFLAGS'
52360ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52361ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52362ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52363
52364  CFLAGS="$saved_cflags"
52365
52366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52367$as_echo "$supports" >&6; }
52368  if test "x$supports" = "xyes" ; then
52369    :
52370    C_COMP_SUPPORTS="yes"
52371  else
52372    :
52373    C_COMP_SUPPORTS="no"
52374  fi
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434    # Execute function body
52435
52436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52437$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52438  supports=yes
52439
52440  saved_cxxflags="$CXXFLAGS"
52441  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52442  ac_ext=cpp
52443ac_cpp='$CXXCPP $CPPFLAGS'
52444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52447
52448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52449/* end confdefs.h.  */
52450int i;
52451_ACEOF
52452if ac_fn_cxx_try_compile "$LINENO"; then :
52453
52454else
52455  supports=no
52456fi
52457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52458  ac_ext=cpp
52459ac_cpp='$CXXCPP $CPPFLAGS'
52460ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52461ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52462ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52463
52464  CXXFLAGS="$saved_cxxflags"
52465
52466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52467$as_echo "$supports" >&6; }
52468  if test "x$supports" = "xyes" ; then
52469    :
52470    CXX_COMP_SUPPORTS="yes"
52471  else
52472    :
52473    CXX_COMP_SUPPORTS="no"
52474  fi
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52489$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52490  supports=no
52491  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52492
52493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52494$as_echo "$supports" >&6; }
52495  if test "x$supports" = "xyes" ; then
52496    :
52497    BUILD_CC_CAN_DISABLE_WARNINGS=true
52498  else
52499    :
52500    BUILD_CC_CAN_DISABLE_WARNINGS=false
52501
52502  fi
52503
52504
52505
52506
52507
52508
52509      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52510        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52511      else
52512        BUILD_CC_DISABLE_WARNING_PREFIX=
52513      fi
52514      CC="$CC_OLD"
52515      CXX="$CXX_OLD"
52516      CFLAGS="$CFLAGS_OLD"
52517      ;;
52518    clang)
52519      DISABLE_WARNING_PREFIX="-Wno-"
52520      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52521      ;;
52522    xlc)
52523      DISABLE_WARNING_PREFIX="-qsuppress="
52524      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52525      ;;
52526  esac
52527
52528
52529
52530
52531
52532# Setup debug symbols (need objcopy from the toolchain for that)
52533
52534  #
52535  # NATIVE_DEBUG_SYMBOLS
52536  # This must be done after the toolchain is setup, since we're looking at objcopy.
52537  #
52538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52539$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52540
52541# Check whether --with-native-debug-symbols was given.
52542if test "${with_native_debug_symbols+set}" = set; then :
52543  withval=$with_native_debug_symbols;
52544        if test "x$OPENJDK_TARGET_OS" = xaix; then
52545          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52546            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52547          fi
52548        fi
52549
52550else
52551
52552        if test "x$OPENJDK_TARGET_OS" = xaix; then
52553          # AIX doesn't support 'zipped' so use 'internal' as default
52554          with_native_debug_symbols="internal"
52555        else
52556          if test "x$STATIC_BUILD" = xtrue; then
52557            with_native_debug_symbols="none"
52558          else
52559            with_native_debug_symbols="zipped"
52560          fi
52561        fi
52562
52563fi
52564
52565  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52567$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52568
52569  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52570
52571    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52572      if test "x$OBJCOPY" = x; then
52573        # enabling of enable-debug-symbols and can't find objcopy
52574        # this is an error
52575        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52576      fi
52577    fi
52578
52579    COMPILE_WITH_DEBUG_SYMBOLS=true
52580    COPY_DEBUG_SYMBOLS=true
52581    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52582
52583    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52584    DEBUG_BINARIES=false
52585    STRIP_POLICY=min_strip
52586
52587  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52588    COMPILE_WITH_DEBUG_SYMBOLS=false
52589    COPY_DEBUG_SYMBOLS=false
52590    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52591
52592    DEBUG_BINARIES=false
52593    STRIP_POLICY=no_strip
52594  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52595    COMPILE_WITH_DEBUG_SYMBOLS=true
52596    COPY_DEBUG_SYMBOLS=false
52597    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52598
52599    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52600    DEBUG_BINARIES=true
52601    STRIP_POLICY=no_strip
52602    STRIP=""
52603
52604  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52605
52606    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52607      if test "x$OBJCOPY" = x; then
52608        # enabling of enable-debug-symbols and can't find objcopy
52609        # this is an error
52610        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52611      fi
52612    fi
52613
52614    COMPILE_WITH_DEBUG_SYMBOLS=true
52615    COPY_DEBUG_SYMBOLS=true
52616    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52617
52618    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52619    DEBUG_BINARIES=false
52620    STRIP_POLICY=min_strip
52621  else
52622    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52623  fi
52624
52625  # --enable-debug-symbols is deprecated.
52626  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52627
52628  # Check whether --enable-debug-symbols was given.
52629if test "${enable_debug_symbols+set}" = set; then :
52630  enableval=$enable_debug_symbols;
52631fi
52632
52633  if test "x$enable_debug_symbols" != x; then
52634    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52635$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52636
52637    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52638      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52639$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52640    fi
52641
52642  fi
52643
52644
52645  # --enable-zip-debug-info is deprecated.
52646  # Please use --with-native-debug-symbols=zipped .
52647
52648  # Check whether --enable-zip-debug-info was given.
52649if test "${enable_zip_debug_info+set}" = set; then :
52650  enableval=$enable_zip_debug_info;
52651fi
52652
52653  if test "x$enable_zip_debug_info" != x; then
52654    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52655$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52656
52657    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52658      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52659$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52660    fi
52661
52662  fi
52663
52664
52665
52666
52667
52668
52669  # Legacy values
52670
52671
52672
52673
52674  # Check whether --enable-native-coverage was given.
52675if test "${enable_native_coverage+set}" = set; then :
52676  enableval=$enable_native_coverage;
52677fi
52678
52679  GCOV_ENABLED="false"
52680  if test "x$enable_native_coverage" = "xyes"; then
52681    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52683$as_echo_n "checking if native coverage is enabled... " >&6; }
52684      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52685$as_echo "yes" >&6; }
52686      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52687      GCOV_LDFLAGS="-fprofile-arcs"
52688      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52689      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52690      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52691      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52692      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52693      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52694      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52695      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52696      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52697      GCOV_ENABLED="true"
52698    else
52699      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52700    fi
52701  elif test "x$enable_native_coverage" = "xno"; then
52702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52703$as_echo_n "checking if native coverage is enabled... " >&6; }
52704    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52705$as_echo "no" >&6; }
52706  elif test "x$enable_native_coverage" != "x"; then
52707    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52708  fi
52709
52710
52711
52712
52713# Need toolchain to setup dtrace
52714
52715  # Test for dtrace dependencies
52716  # Check whether --enable-dtrace was given.
52717if test "${enable_dtrace+set}" = set; then :
52718  enableval=$enable_dtrace;
52719fi
52720
52721
52722  DTRACE_DEP_MISSING=false
52723
52724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52725$as_echo_n "checking for dtrace tool... " >&6; }
52726  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52727    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52728$as_echo "$DTRACE" >&6; }
52729  else
52730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52731$as_echo "not found, cannot build dtrace" >&6; }
52732    DTRACE_DEP_MISSING=true
52733  fi
52734
52735  for ac_header in sys/sdt.h
52736do :
52737  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52738if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52739  cat >>confdefs.h <<_ACEOF
52740#define HAVE_SYS_SDT_H 1
52741_ACEOF
52742 DTRACE_HEADERS_OK=yes
52743else
52744  DTRACE_HEADERS_OK=no
52745fi
52746
52747done
52748
52749  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52750    DTRACE_DEP_MISSING=true
52751  fi
52752
52753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52754$as_echo_n "checking if dtrace should be built... " >&6; }
52755  if test "x$enable_dtrace" = "xyes"; then
52756    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52758$as_echo "no, missing dependencies" >&6; }
52759
52760  # Print a helpful message on how to acquire the necessary build dependency.
52761  # dtrace is the help tag: freetype, cups, alsa etc
52762  MISSING_DEPENDENCY=dtrace
52763
52764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52765    cygwin_help $MISSING_DEPENDENCY
52766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52767    msys_help $MISSING_DEPENDENCY
52768  else
52769    PKGHANDLER_COMMAND=
52770
52771    case $PKGHANDLER in
52772      apt-get)
52773        apt_help     $MISSING_DEPENDENCY ;;
52774      yum)
52775        yum_help     $MISSING_DEPENDENCY ;;
52776      port)
52777        port_help    $MISSING_DEPENDENCY ;;
52778      pkgutil)
52779        pkgutil_help $MISSING_DEPENDENCY ;;
52780      pkgadd)
52781        pkgadd_help  $MISSING_DEPENDENCY ;;
52782    esac
52783
52784    if test "x$PKGHANDLER_COMMAND" != x; then
52785      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52786    fi
52787  fi
52788
52789      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52790    else
52791      INCLUDE_DTRACE=true
52792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52793$as_echo "yes, forced" >&6; }
52794    fi
52795  elif test "x$enable_dtrace" = "xno"; then
52796    INCLUDE_DTRACE=false
52797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52798$as_echo "no, forced" >&6; }
52799  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52800    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52801      INCLUDE_DTRACE=false
52802      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52803$as_echo "no, missing dependencies" >&6; }
52804    else
52805      INCLUDE_DTRACE=true
52806      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52807$as_echo "yes, dependencies present" >&6; }
52808    fi
52809  else
52810    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52811  fi
52812
52813
52814
52815  # The user can in some cases supply additional jvm features. For the custom
52816  # variant, this defines the entire variant.
52817
52818# Check whether --with-jvm-features was given.
52819if test "${with_jvm_features+set}" = set; then :
52820  withval=$with_jvm_features;
52821fi
52822
52823  if test "x$with_jvm_features" != x; then
52824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52825$as_echo_n "checking additional JVM features... " >&6; }
52826    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52828$as_echo "$JVM_FEATURES" >&6; }
52829  fi
52830
52831  # Verify that dependencies are met for explicitly set features.
52832  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52833    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52834  fi
52835
52836  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52837    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52838  fi
52839
52840  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
52841    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52842  fi
52843
52844  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52845    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52846  fi
52847
52848  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52849    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52850  fi
52851
52852  # Turn on additional features based on other parts of configure
52853  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52854    JVM_FEATURES="$JVM_FEATURES dtrace"
52855  else
52856    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52857      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52858    fi
52859  fi
52860
52861  if test "x$STATIC_BUILD" = "xtrue"; then
52862    JVM_FEATURES="$JVM_FEATURES static-build"
52863  else
52864    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52865      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52866    fi
52867  fi
52868
52869  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52870    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52871      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52872    fi
52873  fi
52874
52875  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52876    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52877      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52878    fi
52879  fi
52880
52881  # Only enable jvmci on x86_64, sparcv9 and aarch64.
52882  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52883      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52884      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52885    JVM_FEATURES_jvmci="jvmci"
52886  else
52887    JVM_FEATURES_jvmci=""
52888  fi
52889
52890  # All variants but minimal (and custom) get these features
52891  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52892
52893  # Enable features depending on variant.
52894  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52895  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52896  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52897  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52898  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52899  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52900  JVM_FEATURES_custom="$JVM_FEATURES"
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910  # Used for verification of Makefiles by check-jvm-feature
52911
52912
52913  # We don't support --with-jvm-interpreter anymore, use zero instead.
52914
52915
52916# Check whether --with-jvm-interpreter was given.
52917if test "${with_jvm_interpreter+set}" = set; then :
52918  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52919$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52920fi
52921
52922
52923
52924
52925  # Check whether --enable-hotspot-gtest was given.
52926if test "${enable_hotspot_gtest+set}" = set; then :
52927  enableval=$enable_hotspot_gtest;
52928fi
52929
52930
52931  if test -e "$HOTSPOT_TOPDIR/test/native"; then
52932    GTEST_DIR_EXISTS="true"
52933  else
52934    GTEST_DIR_EXISTS="false"
52935  fi
52936
52937  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52938$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52939  if test "x$enable_hotspot_gtest" = "xyes"; then
52940    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52941      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52942$as_echo "yes, forced" >&6; }
52943      BUILD_GTEST="true"
52944    else
52945      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52946    fi
52947  elif test "x$enable_hotspot_gtest" = "xno"; then
52948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52949$as_echo "no, forced" >&6; }
52950    BUILD_GTEST="false"
52951  elif test "x$enable_hotspot_gtest" = "x"; then
52952    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52954$as_echo "yes" >&6; }
52955      BUILD_GTEST="true"
52956    else
52957      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52958$as_echo "no" >&6; }
52959      BUILD_GTEST="false"
52960    fi
52961  else
52962    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52963  fi
52964
52965
52966
52967
52968###############################################################################
52969#
52970# Check dependencies for external and internal libraries.
52971#
52972###############################################################################
52973
52974# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52975
52976  # When using cygwin or msys, we need a wrapper binary that renames
52977  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52978  # @files and rewrites these too! This wrapper binary is
52979  # called fixpath.
52980  FIXPATH=
52981  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52983$as_echo_n "checking if fixpath can be created... " >&6; }
52984    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52985    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52986    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52987    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52988      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52989      FIXPATH="$FIXPATH_BIN -c"
52990    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52991      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52992      # @ was chosen as separator to minimize risk of other tools messing around with it
52993      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52994          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52995      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52996      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52997    fi
52998    FIXPATH_SRC_W="$FIXPATH_SRC"
52999    FIXPATH_BIN_W="$FIXPATH_BIN"
53000
53001  unix_path="$FIXPATH_SRC_W"
53002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53003    windows_path=`$CYGPATH -m "$unix_path"`
53004    FIXPATH_SRC_W="$windows_path"
53005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53006    windows_path=`cmd //c echo $unix_path`
53007    FIXPATH_SRC_W="$windows_path"
53008  fi
53009
53010
53011  unix_path="$FIXPATH_BIN_W"
53012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53013    windows_path=`$CYGPATH -m "$unix_path"`
53014    FIXPATH_BIN_W="$windows_path"
53015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53016    windows_path=`cmd //c echo $unix_path`
53017    FIXPATH_BIN_W="$windows_path"
53018  fi
53019
53020    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53021    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53022    cd $FIXPATH_DIR
53023    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53024    cd $CURDIR
53025
53026    if test ! -x $FIXPATH_BIN; then
53027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53028$as_echo "no" >&6; }
53029      cat $FIXPATH_DIR/fixpath1.log
53030      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53031    fi
53032    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53033$as_echo "yes" >&6; }
53034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53035$as_echo_n "checking if fixpath.exe works... " >&6; }
53036    cd $FIXPATH_DIR
53037    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53038        > $FIXPATH_DIR/fixpath2.log 2>&1
53039    cd $CURDIR
53040    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53041      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53042$as_echo "no" >&6; }
53043      cat $FIXPATH_DIR/fixpath2.log
53044      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53045    fi
53046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53047$as_echo "yes" >&6; }
53048
53049    FIXPATH_DETACH_FLAG="--detach"
53050  fi
53051
53052
53053
53054
53055
53056
53057  # Check if X11 is needed
53058  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53059    # No X11 support on windows or macosx
53060    NEEDS_LIB_X11=false
53061  else
53062    # All other instances need X11, even if building headless only, libawt still
53063    # needs X11 headers.
53064    NEEDS_LIB_X11=true
53065  fi
53066
53067  # Check if cups is needed
53068  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53069    # Windows have a separate print system
53070    NEEDS_LIB_CUPS=false
53071  else
53072    NEEDS_LIB_CUPS=true
53073  fi
53074
53075  # A custom hook may have set this already
53076  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53077    NEEDS_LIB_FREETYPE=true
53078  fi
53079
53080  # Check if alsa is needed
53081  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53082    NEEDS_LIB_ALSA=true
53083  else
53084    NEEDS_LIB_ALSA=false
53085  fi
53086
53087  # Check if ffi is needed
53088  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53089    NEEDS_LIB_FFI=true
53090  else
53091    NEEDS_LIB_FFI=false
53092  fi
53093
53094
53095  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53096  # dynamic build is configured on command line.
53097
53098# Check whether --with-stdc++lib was given.
53099if test "${with_stdc__lib+set}" = set; then :
53100  withval=$with_stdc__lib;
53101        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53102                && test "x$with_stdc__lib" != xdefault; then
53103          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53104        fi
53105
53106else
53107  with_stdc__lib=default
53108
53109fi
53110
53111
53112  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53113    # Test if stdc++ can be linked statically.
53114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53115$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53116    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53117    ac_ext=cpp
53118ac_cpp='$CXXCPP $CPPFLAGS'
53119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53122
53123    OLD_LIBS="$LIBS"
53124    LIBS="$STATIC_STDCXX_FLAGS"
53125    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53126/* end confdefs.h.  */
53127
53128int
53129main ()
53130{
53131return 0;
53132  ;
53133  return 0;
53134}
53135_ACEOF
53136if ac_fn_cxx_try_link "$LINENO"; then :
53137  has_static_libstdcxx=yes
53138else
53139  has_static_libstdcxx=no
53140fi
53141rm -f core conftest.err conftest.$ac_objext \
53142    conftest$ac_exeext conftest.$ac_ext
53143    LIBS="$OLD_LIBS"
53144    ac_ext=cpp
53145ac_cpp='$CXXCPP $CPPFLAGS'
53146ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53147ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53148ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53149
53150    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53151$as_echo "$has_static_libstdcxx" >&6; }
53152
53153    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53154      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53155    fi
53156
53157    # If dynamic was requested, it's available since it would fail above otherwise.
53158    # If dynamic wasn't requested, go with static unless it isn't available.
53159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53160$as_echo_n "checking how to link with libstdc++... " >&6; }
53161    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53162        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53164$as_echo "dynamic" >&6; }
53165    else
53166      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53167      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53168      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53169      # just use the same setting as for the TARGET toolchain.
53170      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53172$as_echo "static" >&6; }
53173    fi
53174  fi
53175
53176  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53177  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53178    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53179  fi
53180
53181
53182
53183  # Setup Windows runtime dlls
53184  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53185
53186
53187# Check whether --with-msvcr-dll was given.
53188if test "${with_msvcr_dll+set}" = set; then :
53189  withval=$with_msvcr_dll;
53190fi
53191
53192
53193  if test "x$with_msvcr_dll" != x; then
53194    # If given explicitely by user, do not probe. If not present, fail directly.
53195
53196  DLL_NAME="$MSVCR_NAME"
53197  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53198  METHOD="--with-msvcr-dll"
53199  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53200    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53201$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53202
53203    # Need to check if the found msvcr is correct architecture
53204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53205$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53206    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53207    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53208      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53209      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53210      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53211        CORRECT_MSVCR_ARCH="PE32 executable"
53212      else
53213        CORRECT_MSVCR_ARCH="PE32+ executable"
53214      fi
53215    else
53216      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53217        CORRECT_MSVCR_ARCH=386
53218      else
53219        CORRECT_MSVCR_ARCH=x86-64
53220      fi
53221    fi
53222    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53224$as_echo "ok" >&6; }
53225      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53226
53227  # Only process if variable expands to non-empty
53228
53229  if test "x$MSVC_DLL" != x; then
53230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53231
53232  # Input might be given as Windows format, start by converting to
53233  # unix format.
53234  path="$MSVC_DLL"
53235  new_path=`$CYGPATH -u "$path"`
53236
53237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53240  # "foo.exe" is OK but "foo" is an error.
53241  #
53242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53243  # It is also a way to make sure we got the proper file name for the real test later on.
53244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53245  if test "x$test_shortpath" = x; then
53246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53247$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53248    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53249  fi
53250
53251  # Call helper function which possibly converts this using DOS-style short mode.
53252  # If so, the updated path is stored in $new_path.
53253
53254  input_path="$new_path"
53255  # Check if we need to convert this using DOS-style short mode. If the path
53256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53257  # take no chances and rewrite it.
53258  # Note: m4 eats our [], so we need to use [ and ] instead.
53259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53260  if test "x$has_forbidden_chars" != x; then
53261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53265      # Going to short mode and back again did indeed matter. Since short mode is
53266      # case insensitive, let's make it lowercase to improve readability.
53267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53268      # Now convert it back to Unix-style (cygpath)
53269      input_path=`$CYGPATH -u "$shortmode_path"`
53270      new_path="$input_path"
53271    fi
53272  fi
53273
53274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53275  if test "x$test_cygdrive_prefix" = x; then
53276    # As a simple fix, exclude /usr/bin since it's not a real path.
53277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53279      # a path prefixed by /cygdrive for fixpath to work.
53280      new_path="$CYGWIN_ROOT_PATH$input_path"
53281    fi
53282  fi
53283
53284
53285  if test "x$path" != "x$new_path"; then
53286    MSVC_DLL="$new_path"
53287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53288$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53289  fi
53290
53291    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53292
53293  path="$MSVC_DLL"
53294  has_colon=`$ECHO $path | $GREP ^.:`
53295  new_path="$path"
53296  if test "x$has_colon" = x; then
53297    # Not in mixed or Windows style, start by that.
53298    new_path=`cmd //c echo $path`
53299  fi
53300
53301
53302  input_path="$new_path"
53303  # Check if we need to convert this using DOS-style short mode. If the path
53304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53305  # take no chances and rewrite it.
53306  # Note: m4 eats our [], so we need to use [ and ] instead.
53307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53308  if test "x$has_forbidden_chars" != x; then
53309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53311  fi
53312
53313
53314  windows_path="$new_path"
53315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53316    unix_path=`$CYGPATH -u "$windows_path"`
53317    new_path="$unix_path"
53318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53320    new_path="$unix_path"
53321  fi
53322
53323  if test "x$path" != "x$new_path"; then
53324    MSVC_DLL="$new_path"
53325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53326$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53327  fi
53328
53329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53331
53332    else
53333      # We're on a unix platform. Hooray! :)
53334      path="$MSVC_DLL"
53335      has_space=`$ECHO "$path" | $GREP " "`
53336      if test "x$has_space" != x; then
53337        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53338$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53339        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53340      fi
53341
53342      # Use eval to expand a potential ~
53343      eval path="$path"
53344      if test ! -f "$path" && test ! -d "$path"; then
53345        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53346      fi
53347
53348      if test -d "$path"; then
53349        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53350      else
53351        dir="`$DIRNAME "$path"`"
53352        base="`$BASENAME "$path"`"
53353        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53354      fi
53355    fi
53356  fi
53357
53358      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53359$as_echo_n "checking for $DLL_NAME... " >&6; }
53360      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53361$as_echo "$MSVC_DLL" >&6; }
53362    else
53363      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53364$as_echo "incorrect, ignoring" >&6; }
53365      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53366$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53367    fi
53368  fi
53369
53370    if test "x$MSVC_DLL" = x; then
53371      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53372    fi
53373    MSVCR_DLL="$MSVC_DLL"
53374  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53375
53376  DLL_NAME="$MSVCR_NAME"
53377  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53378  METHOD="devkit"
53379  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53380    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53381$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53382
53383    # Need to check if the found msvcr is correct architecture
53384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53385$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53386    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53388      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53389      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53390      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53391        CORRECT_MSVCR_ARCH="PE32 executable"
53392      else
53393        CORRECT_MSVCR_ARCH="PE32+ executable"
53394      fi
53395    else
53396      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53397        CORRECT_MSVCR_ARCH=386
53398      else
53399        CORRECT_MSVCR_ARCH=x86-64
53400      fi
53401    fi
53402    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53403      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53404$as_echo "ok" >&6; }
53405      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53406
53407  # Only process if variable expands to non-empty
53408
53409  if test "x$MSVC_DLL" != x; then
53410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53411
53412  # Input might be given as Windows format, start by converting to
53413  # unix format.
53414  path="$MSVC_DLL"
53415  new_path=`$CYGPATH -u "$path"`
53416
53417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53420  # "foo.exe" is OK but "foo" is an error.
53421  #
53422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53423  # It is also a way to make sure we got the proper file name for the real test later on.
53424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53425  if test "x$test_shortpath" = x; then
53426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53427$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53428    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53429  fi
53430
53431  # Call helper function which possibly converts this using DOS-style short mode.
53432  # If so, the updated path is stored in $new_path.
53433
53434  input_path="$new_path"
53435  # Check if we need to convert this using DOS-style short mode. If the path
53436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53437  # take no chances and rewrite it.
53438  # Note: m4 eats our [], so we need to use [ and ] instead.
53439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53440  if test "x$has_forbidden_chars" != x; then
53441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53445      # Going to short mode and back again did indeed matter. Since short mode is
53446      # case insensitive, let's make it lowercase to improve readability.
53447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53448      # Now convert it back to Unix-style (cygpath)
53449      input_path=`$CYGPATH -u "$shortmode_path"`
53450      new_path="$input_path"
53451    fi
53452  fi
53453
53454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53455  if test "x$test_cygdrive_prefix" = x; then
53456    # As a simple fix, exclude /usr/bin since it's not a real path.
53457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53459      # a path prefixed by /cygdrive for fixpath to work.
53460      new_path="$CYGWIN_ROOT_PATH$input_path"
53461    fi
53462  fi
53463
53464
53465  if test "x$path" != "x$new_path"; then
53466    MSVC_DLL="$new_path"
53467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53468$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53469  fi
53470
53471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53472
53473  path="$MSVC_DLL"
53474  has_colon=`$ECHO $path | $GREP ^.:`
53475  new_path="$path"
53476  if test "x$has_colon" = x; then
53477    # Not in mixed or Windows style, start by that.
53478    new_path=`cmd //c echo $path`
53479  fi
53480
53481
53482  input_path="$new_path"
53483  # Check if we need to convert this using DOS-style short mode. If the path
53484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53485  # take no chances and rewrite it.
53486  # Note: m4 eats our [], so we need to use [ and ] instead.
53487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53488  if test "x$has_forbidden_chars" != x; then
53489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53491  fi
53492
53493
53494  windows_path="$new_path"
53495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53496    unix_path=`$CYGPATH -u "$windows_path"`
53497    new_path="$unix_path"
53498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53500    new_path="$unix_path"
53501  fi
53502
53503  if test "x$path" != "x$new_path"; then
53504    MSVC_DLL="$new_path"
53505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53506$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53507  fi
53508
53509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53511
53512    else
53513      # We're on a unix platform. Hooray! :)
53514      path="$MSVC_DLL"
53515      has_space=`$ECHO "$path" | $GREP " "`
53516      if test "x$has_space" != x; then
53517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53518$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53520      fi
53521
53522      # Use eval to expand a potential ~
53523      eval path="$path"
53524      if test ! -f "$path" && test ! -d "$path"; then
53525        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53526      fi
53527
53528      if test -d "$path"; then
53529        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53530      else
53531        dir="`$DIRNAME "$path"`"
53532        base="`$BASENAME "$path"`"
53533        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53534      fi
53535    fi
53536  fi
53537
53538      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53539$as_echo_n "checking for $DLL_NAME... " >&6; }
53540      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53541$as_echo "$MSVC_DLL" >&6; }
53542    else
53543      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53544$as_echo "incorrect, ignoring" >&6; }
53545      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53546$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53547    fi
53548  fi
53549
53550    if test "x$MSVC_DLL" = x; then
53551      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53552    fi
53553    MSVCR_DLL="$MSVC_DLL"
53554  else
53555
53556  DLL_NAME="${MSVCR_NAME}"
53557  MSVC_DLL=
53558
53559  if test "x$MSVC_DLL" = x; then
53560    # Probe: Using well-known location from Visual Studio 10.0
53561    if test "x$VCINSTALLDIR" != x; then
53562      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53563
53564  windows_path="$CYGWIN_VC_INSTALL_DIR"
53565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53566    unix_path=`$CYGPATH -u "$windows_path"`
53567    CYGWIN_VC_INSTALL_DIR="$unix_path"
53568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53570    CYGWIN_VC_INSTALL_DIR="$unix_path"
53571  fi
53572
53573      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53574        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53575      else
53576        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53577      fi
53578      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53579
53580  DLL_NAME="$DLL_NAME"
53581  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53582  METHOD="well-known location in VCINSTALLDIR"
53583  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53584    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53585$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53586
53587    # Need to check if the found msvcr is correct architecture
53588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53589$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53590    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53592      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53593      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53594      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53595        CORRECT_MSVCR_ARCH="PE32 executable"
53596      else
53597        CORRECT_MSVCR_ARCH="PE32+ executable"
53598      fi
53599    else
53600      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53601        CORRECT_MSVCR_ARCH=386
53602      else
53603        CORRECT_MSVCR_ARCH=x86-64
53604      fi
53605    fi
53606    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53608$as_echo "ok" >&6; }
53609      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53610
53611  # Only process if variable expands to non-empty
53612
53613  if test "x$MSVC_DLL" != x; then
53614    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53615
53616  # Input might be given as Windows format, start by converting to
53617  # unix format.
53618  path="$MSVC_DLL"
53619  new_path=`$CYGPATH -u "$path"`
53620
53621  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53622  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53623  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53624  # "foo.exe" is OK but "foo" is an error.
53625  #
53626  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53627  # It is also a way to make sure we got the proper file name for the real test later on.
53628  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53629  if test "x$test_shortpath" = x; then
53630    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53631$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53632    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53633  fi
53634
53635  # Call helper function which possibly converts this using DOS-style short mode.
53636  # If so, the updated path is stored in $new_path.
53637
53638  input_path="$new_path"
53639  # Check if we need to convert this using DOS-style short mode. If the path
53640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53641  # take no chances and rewrite it.
53642  # Note: m4 eats our [], so we need to use [ and ] instead.
53643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53644  if test "x$has_forbidden_chars" != x; then
53645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53646    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53647    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53648    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53649      # Going to short mode and back again did indeed matter. Since short mode is
53650      # case insensitive, let's make it lowercase to improve readability.
53651      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53652      # Now convert it back to Unix-style (cygpath)
53653      input_path=`$CYGPATH -u "$shortmode_path"`
53654      new_path="$input_path"
53655    fi
53656  fi
53657
53658  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53659  if test "x$test_cygdrive_prefix" = x; then
53660    # As a simple fix, exclude /usr/bin since it's not a real path.
53661    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53662      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53663      # a path prefixed by /cygdrive for fixpath to work.
53664      new_path="$CYGWIN_ROOT_PATH$input_path"
53665    fi
53666  fi
53667
53668
53669  if test "x$path" != "x$new_path"; then
53670    MSVC_DLL="$new_path"
53671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53672$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53673  fi
53674
53675    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53676
53677  path="$MSVC_DLL"
53678  has_colon=`$ECHO $path | $GREP ^.:`
53679  new_path="$path"
53680  if test "x$has_colon" = x; then
53681    # Not in mixed or Windows style, start by that.
53682    new_path=`cmd //c echo $path`
53683  fi
53684
53685
53686  input_path="$new_path"
53687  # Check if we need to convert this using DOS-style short mode. If the path
53688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53689  # take no chances and rewrite it.
53690  # Note: m4 eats our [], so we need to use [ and ] instead.
53691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53692  if test "x$has_forbidden_chars" != x; then
53693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53695  fi
53696
53697
53698  windows_path="$new_path"
53699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53700    unix_path=`$CYGPATH -u "$windows_path"`
53701    new_path="$unix_path"
53702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53704    new_path="$unix_path"
53705  fi
53706
53707  if test "x$path" != "x$new_path"; then
53708    MSVC_DLL="$new_path"
53709    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53710$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53711  fi
53712
53713  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53714  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53715
53716    else
53717      # We're on a unix platform. Hooray! :)
53718      path="$MSVC_DLL"
53719      has_space=`$ECHO "$path" | $GREP " "`
53720      if test "x$has_space" != x; then
53721        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53722$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53723        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53724      fi
53725
53726      # Use eval to expand a potential ~
53727      eval path="$path"
53728      if test ! -f "$path" && test ! -d "$path"; then
53729        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53730      fi
53731
53732      if test -d "$path"; then
53733        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53734      else
53735        dir="`$DIRNAME "$path"`"
53736        base="`$BASENAME "$path"`"
53737        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53738      fi
53739    fi
53740  fi
53741
53742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53743$as_echo_n "checking for $DLL_NAME... " >&6; }
53744      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53745$as_echo "$MSVC_DLL" >&6; }
53746    else
53747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53748$as_echo "incorrect, ignoring" >&6; }
53749      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53750$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53751    fi
53752  fi
53753
53754    fi
53755  fi
53756
53757  if test "x$MSVC_DLL" = x; then
53758    # Probe: Check in the Boot JDK directory.
53759    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53760
53761  DLL_NAME="$DLL_NAME"
53762  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53763  METHOD="well-known location in Boot JDK"
53764  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53765    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53766$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53767
53768    # Need to check if the found msvcr is correct architecture
53769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53770$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53771    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53773      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53774      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53775      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53776        CORRECT_MSVCR_ARCH="PE32 executable"
53777      else
53778        CORRECT_MSVCR_ARCH="PE32+ executable"
53779      fi
53780    else
53781      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53782        CORRECT_MSVCR_ARCH=386
53783      else
53784        CORRECT_MSVCR_ARCH=x86-64
53785      fi
53786    fi
53787    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53789$as_echo "ok" >&6; }
53790      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53791
53792  # Only process if variable expands to non-empty
53793
53794  if test "x$MSVC_DLL" != x; then
53795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53796
53797  # Input might be given as Windows format, start by converting to
53798  # unix format.
53799  path="$MSVC_DLL"
53800  new_path=`$CYGPATH -u "$path"`
53801
53802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53805  # "foo.exe" is OK but "foo" is an error.
53806  #
53807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53808  # It is also a way to make sure we got the proper file name for the real test later on.
53809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53810  if test "x$test_shortpath" = x; then
53811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53812$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53813    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53814  fi
53815
53816  # Call helper function which possibly converts this using DOS-style short mode.
53817  # If so, the updated path is stored in $new_path.
53818
53819  input_path="$new_path"
53820  # Check if we need to convert this using DOS-style short mode. If the path
53821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53822  # take no chances and rewrite it.
53823  # Note: m4 eats our [], so we need to use [ and ] instead.
53824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53825  if test "x$has_forbidden_chars" != x; then
53826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53830      # Going to short mode and back again did indeed matter. Since short mode is
53831      # case insensitive, let's make it lowercase to improve readability.
53832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53833      # Now convert it back to Unix-style (cygpath)
53834      input_path=`$CYGPATH -u "$shortmode_path"`
53835      new_path="$input_path"
53836    fi
53837  fi
53838
53839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53840  if test "x$test_cygdrive_prefix" = x; then
53841    # As a simple fix, exclude /usr/bin since it's not a real path.
53842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53844      # a path prefixed by /cygdrive for fixpath to work.
53845      new_path="$CYGWIN_ROOT_PATH$input_path"
53846    fi
53847  fi
53848
53849
53850  if test "x$path" != "x$new_path"; then
53851    MSVC_DLL="$new_path"
53852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53853$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53854  fi
53855
53856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53857
53858  path="$MSVC_DLL"
53859  has_colon=`$ECHO $path | $GREP ^.:`
53860  new_path="$path"
53861  if test "x$has_colon" = x; then
53862    # Not in mixed or Windows style, start by that.
53863    new_path=`cmd //c echo $path`
53864  fi
53865
53866
53867  input_path="$new_path"
53868  # Check if we need to convert this using DOS-style short mode. If the path
53869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53870  # take no chances and rewrite it.
53871  # Note: m4 eats our [], so we need to use [ and ] instead.
53872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53873  if test "x$has_forbidden_chars" != x; then
53874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53876  fi
53877
53878
53879  windows_path="$new_path"
53880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53881    unix_path=`$CYGPATH -u "$windows_path"`
53882    new_path="$unix_path"
53883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53885    new_path="$unix_path"
53886  fi
53887
53888  if test "x$path" != "x$new_path"; then
53889    MSVC_DLL="$new_path"
53890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53891$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53892  fi
53893
53894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53896
53897    else
53898      # We're on a unix platform. Hooray! :)
53899      path="$MSVC_DLL"
53900      has_space=`$ECHO "$path" | $GREP " "`
53901      if test "x$has_space" != x; then
53902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53903$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53905      fi
53906
53907      # Use eval to expand a potential ~
53908      eval path="$path"
53909      if test ! -f "$path" && test ! -d "$path"; then
53910        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53911      fi
53912
53913      if test -d "$path"; then
53914        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53915      else
53916        dir="`$DIRNAME "$path"`"
53917        base="`$BASENAME "$path"`"
53918        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53919      fi
53920    fi
53921  fi
53922
53923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53924$as_echo_n "checking for $DLL_NAME... " >&6; }
53925      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53926$as_echo "$MSVC_DLL" >&6; }
53927    else
53928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53929$as_echo "incorrect, ignoring" >&6; }
53930      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53931$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53932    fi
53933  fi
53934
53935  fi
53936
53937  if test "x$MSVC_DLL" = x; then
53938    # Probe: Look in the Windows system32 directory
53939    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53940
53941  windows_path="$CYGWIN_SYSTEMROOT"
53942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53943    unix_path=`$CYGPATH -u "$windows_path"`
53944    CYGWIN_SYSTEMROOT="$unix_path"
53945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53947    CYGWIN_SYSTEMROOT="$unix_path"
53948  fi
53949
53950    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53951
53952  DLL_NAME="$DLL_NAME"
53953  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53954  METHOD="well-known location in SYSTEMROOT"
53955  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53956    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53957$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53958
53959    # Need to check if the found msvcr is correct architecture
53960    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53961$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53962    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53964      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53965      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53966      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53967        CORRECT_MSVCR_ARCH="PE32 executable"
53968      else
53969        CORRECT_MSVCR_ARCH="PE32+ executable"
53970      fi
53971    else
53972      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53973        CORRECT_MSVCR_ARCH=386
53974      else
53975        CORRECT_MSVCR_ARCH=x86-64
53976      fi
53977    fi
53978    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53979      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53980$as_echo "ok" >&6; }
53981      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53982
53983  # Only process if variable expands to non-empty
53984
53985  if test "x$MSVC_DLL" != x; then
53986    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53987
53988  # Input might be given as Windows format, start by converting to
53989  # unix format.
53990  path="$MSVC_DLL"
53991  new_path=`$CYGPATH -u "$path"`
53992
53993  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53994  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53995  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53996  # "foo.exe" is OK but "foo" is an error.
53997  #
53998  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53999  # It is also a way to make sure we got the proper file name for the real test later on.
54000  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54001  if test "x$test_shortpath" = x; then
54002    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54003$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54004    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54005  fi
54006
54007  # Call helper function which possibly converts this using DOS-style short mode.
54008  # If so, the updated path is stored in $new_path.
54009
54010  input_path="$new_path"
54011  # Check if we need to convert this using DOS-style short mode. If the path
54012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54013  # take no chances and rewrite it.
54014  # Note: m4 eats our [], so we need to use [ and ] instead.
54015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54016  if test "x$has_forbidden_chars" != x; then
54017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54018    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54019    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54020    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54021      # Going to short mode and back again did indeed matter. Since short mode is
54022      # case insensitive, let's make it lowercase to improve readability.
54023      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54024      # Now convert it back to Unix-style (cygpath)
54025      input_path=`$CYGPATH -u "$shortmode_path"`
54026      new_path="$input_path"
54027    fi
54028  fi
54029
54030  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54031  if test "x$test_cygdrive_prefix" = x; then
54032    # As a simple fix, exclude /usr/bin since it's not a real path.
54033    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54034      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54035      # a path prefixed by /cygdrive for fixpath to work.
54036      new_path="$CYGWIN_ROOT_PATH$input_path"
54037    fi
54038  fi
54039
54040
54041  if test "x$path" != "x$new_path"; then
54042    MSVC_DLL="$new_path"
54043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54044$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54045  fi
54046
54047    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54048
54049  path="$MSVC_DLL"
54050  has_colon=`$ECHO $path | $GREP ^.:`
54051  new_path="$path"
54052  if test "x$has_colon" = x; then
54053    # Not in mixed or Windows style, start by that.
54054    new_path=`cmd //c echo $path`
54055  fi
54056
54057
54058  input_path="$new_path"
54059  # Check if we need to convert this using DOS-style short mode. If the path
54060  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54061  # take no chances and rewrite it.
54062  # Note: m4 eats our [], so we need to use [ and ] instead.
54063  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54064  if test "x$has_forbidden_chars" != x; then
54065    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54066    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54067  fi
54068
54069
54070  windows_path="$new_path"
54071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54072    unix_path=`$CYGPATH -u "$windows_path"`
54073    new_path="$unix_path"
54074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54076    new_path="$unix_path"
54077  fi
54078
54079  if test "x$path" != "x$new_path"; then
54080    MSVC_DLL="$new_path"
54081    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54082$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54083  fi
54084
54085  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54086  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54087
54088    else
54089      # We're on a unix platform. Hooray! :)
54090      path="$MSVC_DLL"
54091      has_space=`$ECHO "$path" | $GREP " "`
54092      if test "x$has_space" != x; then
54093        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54094$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54095        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54096      fi
54097
54098      # Use eval to expand a potential ~
54099      eval path="$path"
54100      if test ! -f "$path" && test ! -d "$path"; then
54101        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54102      fi
54103
54104      if test -d "$path"; then
54105        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54106      else
54107        dir="`$DIRNAME "$path"`"
54108        base="`$BASENAME "$path"`"
54109        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54110      fi
54111    fi
54112  fi
54113
54114      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54115$as_echo_n "checking for $DLL_NAME... " >&6; }
54116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54117$as_echo "$MSVC_DLL" >&6; }
54118    else
54119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54120$as_echo "incorrect, ignoring" >&6; }
54121      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54122$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54123    fi
54124  fi
54125
54126  fi
54127
54128  if test "x$MSVC_DLL" = x; then
54129    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54130    if test "x$VS100COMNTOOLS" != x; then
54131      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54132
54133  windows_path="$CYGWIN_VS_TOOLS_DIR"
54134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54135    unix_path=`$CYGPATH -u "$windows_path"`
54136    CYGWIN_VS_TOOLS_DIR="$unix_path"
54137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54139    CYGWIN_VS_TOOLS_DIR="$unix_path"
54140  fi
54141
54142      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54143        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54144	    | $GREP -i /x64/ | $HEAD --lines 1`
54145      else
54146        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54147	    | $GREP -i /x86/ | $HEAD --lines 1`
54148      fi
54149
54150  DLL_NAME="$DLL_NAME"
54151  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54152  METHOD="search of VS100COMNTOOLS"
54153  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54155$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54156
54157    # Need to check if the found msvcr is correct architecture
54158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54159$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54160    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54162      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54163      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54164      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54165        CORRECT_MSVCR_ARCH="PE32 executable"
54166      else
54167        CORRECT_MSVCR_ARCH="PE32+ executable"
54168      fi
54169    else
54170      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54171        CORRECT_MSVCR_ARCH=386
54172      else
54173        CORRECT_MSVCR_ARCH=x86-64
54174      fi
54175    fi
54176    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54178$as_echo "ok" >&6; }
54179      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54180
54181  # Only process if variable expands to non-empty
54182
54183  if test "x$MSVC_DLL" != x; then
54184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54185
54186  # Input might be given as Windows format, start by converting to
54187  # unix format.
54188  path="$MSVC_DLL"
54189  new_path=`$CYGPATH -u "$path"`
54190
54191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54194  # "foo.exe" is OK but "foo" is an error.
54195  #
54196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54197  # It is also a way to make sure we got the proper file name for the real test later on.
54198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54199  if test "x$test_shortpath" = x; then
54200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54201$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54202    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54203  fi
54204
54205  # Call helper function which possibly converts this using DOS-style short mode.
54206  # If so, the updated path is stored in $new_path.
54207
54208  input_path="$new_path"
54209  # Check if we need to convert this using DOS-style short mode. If the path
54210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54211  # take no chances and rewrite it.
54212  # Note: m4 eats our [], so we need to use [ and ] instead.
54213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54214  if test "x$has_forbidden_chars" != x; then
54215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54219      # Going to short mode and back again did indeed matter. Since short mode is
54220      # case insensitive, let's make it lowercase to improve readability.
54221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54222      # Now convert it back to Unix-style (cygpath)
54223      input_path=`$CYGPATH -u "$shortmode_path"`
54224      new_path="$input_path"
54225    fi
54226  fi
54227
54228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54229  if test "x$test_cygdrive_prefix" = x; then
54230    # As a simple fix, exclude /usr/bin since it's not a real path.
54231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54233      # a path prefixed by /cygdrive for fixpath to work.
54234      new_path="$CYGWIN_ROOT_PATH$input_path"
54235    fi
54236  fi
54237
54238
54239  if test "x$path" != "x$new_path"; then
54240    MSVC_DLL="$new_path"
54241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54242$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54243  fi
54244
54245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54246
54247  path="$MSVC_DLL"
54248  has_colon=`$ECHO $path | $GREP ^.:`
54249  new_path="$path"
54250  if test "x$has_colon" = x; then
54251    # Not in mixed or Windows style, start by that.
54252    new_path=`cmd //c echo $path`
54253  fi
54254
54255
54256  input_path="$new_path"
54257  # Check if we need to convert this using DOS-style short mode. If the path
54258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54259  # take no chances and rewrite it.
54260  # Note: m4 eats our [], so we need to use [ and ] instead.
54261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54262  if test "x$has_forbidden_chars" != x; then
54263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54265  fi
54266
54267
54268  windows_path="$new_path"
54269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54270    unix_path=`$CYGPATH -u "$windows_path"`
54271    new_path="$unix_path"
54272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54274    new_path="$unix_path"
54275  fi
54276
54277  if test "x$path" != "x$new_path"; then
54278    MSVC_DLL="$new_path"
54279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54280$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54281  fi
54282
54283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54285
54286    else
54287      # We're on a unix platform. Hooray! :)
54288      path="$MSVC_DLL"
54289      has_space=`$ECHO "$path" | $GREP " "`
54290      if test "x$has_space" != x; then
54291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54292$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54294      fi
54295
54296      # Use eval to expand a potential ~
54297      eval path="$path"
54298      if test ! -f "$path" && test ! -d "$path"; then
54299        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54300      fi
54301
54302      if test -d "$path"; then
54303        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54304      else
54305        dir="`$DIRNAME "$path"`"
54306        base="`$BASENAME "$path"`"
54307        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54308      fi
54309    fi
54310  fi
54311
54312      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54313$as_echo_n "checking for $DLL_NAME... " >&6; }
54314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54315$as_echo "$MSVC_DLL" >&6; }
54316    else
54317      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54318$as_echo "incorrect, ignoring" >&6; }
54319      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54320$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54321    fi
54322  fi
54323
54324    fi
54325  fi
54326
54327  if test "x$MSVC_DLL" = x; then
54328    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54329    # (This was the original behaviour; kept since it might turn something up)
54330    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54331      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54332        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54333	    | $GREP x64 | $HEAD --lines 1`
54334      else
54335        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54336	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54337        if test "x$POSSIBLE_MSVC_DLL" = x; then
54338          # We're grasping at straws now...
54339          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54340	      | $HEAD --lines 1`
54341        fi
54342      fi
54343
54344
54345  DLL_NAME="$DLL_NAME"
54346  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54347  METHOD="search of VCINSTALLDIR"
54348  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54349    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54350$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54351
54352    # Need to check if the found msvcr is correct architecture
54353    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54354$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54355    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54356    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54357      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54358      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54359      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54360        CORRECT_MSVCR_ARCH="PE32 executable"
54361      else
54362        CORRECT_MSVCR_ARCH="PE32+ executable"
54363      fi
54364    else
54365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54366        CORRECT_MSVCR_ARCH=386
54367      else
54368        CORRECT_MSVCR_ARCH=x86-64
54369      fi
54370    fi
54371    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54373$as_echo "ok" >&6; }
54374      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54375
54376  # Only process if variable expands to non-empty
54377
54378  if test "x$MSVC_DLL" != x; then
54379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54380
54381  # Input might be given as Windows format, start by converting to
54382  # unix format.
54383  path="$MSVC_DLL"
54384  new_path=`$CYGPATH -u "$path"`
54385
54386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54389  # "foo.exe" is OK but "foo" is an error.
54390  #
54391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54392  # It is also a way to make sure we got the proper file name for the real test later on.
54393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54394  if test "x$test_shortpath" = x; then
54395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54396$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54397    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54398  fi
54399
54400  # Call helper function which possibly converts this using DOS-style short mode.
54401  # If so, the updated path is stored in $new_path.
54402
54403  input_path="$new_path"
54404  # Check if we need to convert this using DOS-style short mode. If the path
54405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54406  # take no chances and rewrite it.
54407  # Note: m4 eats our [], so we need to use [ and ] instead.
54408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54409  if test "x$has_forbidden_chars" != x; then
54410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54414      # Going to short mode and back again did indeed matter. Since short mode is
54415      # case insensitive, let's make it lowercase to improve readability.
54416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54417      # Now convert it back to Unix-style (cygpath)
54418      input_path=`$CYGPATH -u "$shortmode_path"`
54419      new_path="$input_path"
54420    fi
54421  fi
54422
54423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54424  if test "x$test_cygdrive_prefix" = x; then
54425    # As a simple fix, exclude /usr/bin since it's not a real path.
54426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54428      # a path prefixed by /cygdrive for fixpath to work.
54429      new_path="$CYGWIN_ROOT_PATH$input_path"
54430    fi
54431  fi
54432
54433
54434  if test "x$path" != "x$new_path"; then
54435    MSVC_DLL="$new_path"
54436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54437$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54438  fi
54439
54440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54441
54442  path="$MSVC_DLL"
54443  has_colon=`$ECHO $path | $GREP ^.:`
54444  new_path="$path"
54445  if test "x$has_colon" = x; then
54446    # Not in mixed or Windows style, start by that.
54447    new_path=`cmd //c echo $path`
54448  fi
54449
54450
54451  input_path="$new_path"
54452  # Check if we need to convert this using DOS-style short mode. If the path
54453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54454  # take no chances and rewrite it.
54455  # Note: m4 eats our [], so we need to use [ and ] instead.
54456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54457  if test "x$has_forbidden_chars" != x; then
54458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54460  fi
54461
54462
54463  windows_path="$new_path"
54464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54465    unix_path=`$CYGPATH -u "$windows_path"`
54466    new_path="$unix_path"
54467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54469    new_path="$unix_path"
54470  fi
54471
54472  if test "x$path" != "x$new_path"; then
54473    MSVC_DLL="$new_path"
54474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54475$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54476  fi
54477
54478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54480
54481    else
54482      # We're on a unix platform. Hooray! :)
54483      path="$MSVC_DLL"
54484      has_space=`$ECHO "$path" | $GREP " "`
54485      if test "x$has_space" != x; then
54486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54487$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54489      fi
54490
54491      # Use eval to expand a potential ~
54492      eval path="$path"
54493      if test ! -f "$path" && test ! -d "$path"; then
54494        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54495      fi
54496
54497      if test -d "$path"; then
54498        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54499      else
54500        dir="`$DIRNAME "$path"`"
54501        base="`$BASENAME "$path"`"
54502        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54503      fi
54504    fi
54505  fi
54506
54507      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54508$as_echo_n "checking for $DLL_NAME... " >&6; }
54509      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54510$as_echo "$MSVC_DLL" >&6; }
54511    else
54512      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54513$as_echo "incorrect, ignoring" >&6; }
54514      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54515$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54516    fi
54517  fi
54518
54519    fi
54520  fi
54521
54522  if test "x$MSVC_DLL" = x; then
54523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54524$as_echo_n "checking for $DLL_NAME... " >&6; }
54525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54526$as_echo "no" >&6; }
54527    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54528  fi
54529
54530    MSVCR_DLL="$MSVC_DLL"
54531  fi
54532
54533
54534
54535# Check whether --with-msvcp-dll was given.
54536if test "${with_msvcp_dll+set}" = set; then :
54537  withval=$with_msvcp_dll;
54538fi
54539
54540
54541  if test "x$MSVCP_NAME" != "x"; then
54542    if test "x$with_msvcp_dll" != x; then
54543      # If given explicitely by user, do not probe. If not present, fail directly.
54544
54545  DLL_NAME="$MSVCP_NAME"
54546  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54547  METHOD="--with-msvcp-dll"
54548  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54549    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54550$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54551
54552    # Need to check if the found msvcr is correct architecture
54553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54554$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54555    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54557      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54558      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54559      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54560        CORRECT_MSVCR_ARCH="PE32 executable"
54561      else
54562        CORRECT_MSVCR_ARCH="PE32+ executable"
54563      fi
54564    else
54565      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54566        CORRECT_MSVCR_ARCH=386
54567      else
54568        CORRECT_MSVCR_ARCH=x86-64
54569      fi
54570    fi
54571    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54573$as_echo "ok" >&6; }
54574      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54575
54576  # Only process if variable expands to non-empty
54577
54578  if test "x$MSVC_DLL" != x; then
54579    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54580
54581  # Input might be given as Windows format, start by converting to
54582  # unix format.
54583  path="$MSVC_DLL"
54584  new_path=`$CYGPATH -u "$path"`
54585
54586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54589  # "foo.exe" is OK but "foo" is an error.
54590  #
54591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54592  # It is also a way to make sure we got the proper file name for the real test later on.
54593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54594  if test "x$test_shortpath" = x; then
54595    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54596$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54597    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54598  fi
54599
54600  # Call helper function which possibly converts this using DOS-style short mode.
54601  # If so, the updated path is stored in $new_path.
54602
54603  input_path="$new_path"
54604  # Check if we need to convert this using DOS-style short mode. If the path
54605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54606  # take no chances and rewrite it.
54607  # Note: m4 eats our [], so we need to use [ and ] instead.
54608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54609  if test "x$has_forbidden_chars" != x; then
54610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54614      # Going to short mode and back again did indeed matter. Since short mode is
54615      # case insensitive, let's make it lowercase to improve readability.
54616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54617      # Now convert it back to Unix-style (cygpath)
54618      input_path=`$CYGPATH -u "$shortmode_path"`
54619      new_path="$input_path"
54620    fi
54621  fi
54622
54623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54624  if test "x$test_cygdrive_prefix" = x; then
54625    # As a simple fix, exclude /usr/bin since it's not a real path.
54626    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54628      # a path prefixed by /cygdrive for fixpath to work.
54629      new_path="$CYGWIN_ROOT_PATH$input_path"
54630    fi
54631  fi
54632
54633
54634  if test "x$path" != "x$new_path"; then
54635    MSVC_DLL="$new_path"
54636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54637$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54638  fi
54639
54640    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54641
54642  path="$MSVC_DLL"
54643  has_colon=`$ECHO $path | $GREP ^.:`
54644  new_path="$path"
54645  if test "x$has_colon" = x; then
54646    # Not in mixed or Windows style, start by that.
54647    new_path=`cmd //c echo $path`
54648  fi
54649
54650
54651  input_path="$new_path"
54652  # Check if we need to convert this using DOS-style short mode. If the path
54653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54654  # take no chances and rewrite it.
54655  # Note: m4 eats our [], so we need to use [ and ] instead.
54656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54657  if test "x$has_forbidden_chars" != x; then
54658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54659    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54660  fi
54661
54662
54663  windows_path="$new_path"
54664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54665    unix_path=`$CYGPATH -u "$windows_path"`
54666    new_path="$unix_path"
54667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54669    new_path="$unix_path"
54670  fi
54671
54672  if test "x$path" != "x$new_path"; then
54673    MSVC_DLL="$new_path"
54674    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54675$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54676  fi
54677
54678  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54679  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54680
54681    else
54682      # We're on a unix platform. Hooray! :)
54683      path="$MSVC_DLL"
54684      has_space=`$ECHO "$path" | $GREP " "`
54685      if test "x$has_space" != x; then
54686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54687$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54688        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54689      fi
54690
54691      # Use eval to expand a potential ~
54692      eval path="$path"
54693      if test ! -f "$path" && test ! -d "$path"; then
54694        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54695      fi
54696
54697      if test -d "$path"; then
54698        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54699      else
54700        dir="`$DIRNAME "$path"`"
54701        base="`$BASENAME "$path"`"
54702        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54703      fi
54704    fi
54705  fi
54706
54707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54708$as_echo_n "checking for $DLL_NAME... " >&6; }
54709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54710$as_echo "$MSVC_DLL" >&6; }
54711    else
54712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54713$as_echo "incorrect, ignoring" >&6; }
54714      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54715$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54716    fi
54717  fi
54718
54719      if test "x$MSVC_DLL" = x; then
54720        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54721      fi
54722      MSVCP_DLL="$MSVC_DLL"
54723    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54724
54725  DLL_NAME="$MSVCP_NAME"
54726  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54727  METHOD="devkit"
54728  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54729    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54730$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54731
54732    # Need to check if the found msvcr is correct architecture
54733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54734$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54735    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54737      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54738      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54739      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54740        CORRECT_MSVCR_ARCH="PE32 executable"
54741      else
54742        CORRECT_MSVCR_ARCH="PE32+ executable"
54743      fi
54744    else
54745      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54746        CORRECT_MSVCR_ARCH=386
54747      else
54748        CORRECT_MSVCR_ARCH=x86-64
54749      fi
54750    fi
54751    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54752      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54753$as_echo "ok" >&6; }
54754      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54755
54756  # Only process if variable expands to non-empty
54757
54758  if test "x$MSVC_DLL" != x; then
54759    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54760
54761  # Input might be given as Windows format, start by converting to
54762  # unix format.
54763  path="$MSVC_DLL"
54764  new_path=`$CYGPATH -u "$path"`
54765
54766  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54767  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54768  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54769  # "foo.exe" is OK but "foo" is an error.
54770  #
54771  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54772  # It is also a way to make sure we got the proper file name for the real test later on.
54773  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54774  if test "x$test_shortpath" = x; then
54775    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54776$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54777    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54778  fi
54779
54780  # Call helper function which possibly converts this using DOS-style short mode.
54781  # If so, the updated path is stored in $new_path.
54782
54783  input_path="$new_path"
54784  # Check if we need to convert this using DOS-style short mode. If the path
54785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54786  # take no chances and rewrite it.
54787  # Note: m4 eats our [], so we need to use [ and ] instead.
54788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54789  if test "x$has_forbidden_chars" != x; then
54790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54791    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54792    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54793    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54794      # Going to short mode and back again did indeed matter. Since short mode is
54795      # case insensitive, let's make it lowercase to improve readability.
54796      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54797      # Now convert it back to Unix-style (cygpath)
54798      input_path=`$CYGPATH -u "$shortmode_path"`
54799      new_path="$input_path"
54800    fi
54801  fi
54802
54803  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54804  if test "x$test_cygdrive_prefix" = x; then
54805    # As a simple fix, exclude /usr/bin since it's not a real path.
54806    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54807      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54808      # a path prefixed by /cygdrive for fixpath to work.
54809      new_path="$CYGWIN_ROOT_PATH$input_path"
54810    fi
54811  fi
54812
54813
54814  if test "x$path" != "x$new_path"; then
54815    MSVC_DLL="$new_path"
54816    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54817$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54818  fi
54819
54820    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54821
54822  path="$MSVC_DLL"
54823  has_colon=`$ECHO $path | $GREP ^.:`
54824  new_path="$path"
54825  if test "x$has_colon" = x; then
54826    # Not in mixed or Windows style, start by that.
54827    new_path=`cmd //c echo $path`
54828  fi
54829
54830
54831  input_path="$new_path"
54832  # Check if we need to convert this using DOS-style short mode. If the path
54833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54834  # take no chances and rewrite it.
54835  # Note: m4 eats our [], so we need to use [ and ] instead.
54836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54837  if test "x$has_forbidden_chars" != x; then
54838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54840  fi
54841
54842
54843  windows_path="$new_path"
54844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54845    unix_path=`$CYGPATH -u "$windows_path"`
54846    new_path="$unix_path"
54847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54849    new_path="$unix_path"
54850  fi
54851
54852  if test "x$path" != "x$new_path"; then
54853    MSVC_DLL="$new_path"
54854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54855$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54856  fi
54857
54858  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54859  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54860
54861    else
54862      # We're on a unix platform. Hooray! :)
54863      path="$MSVC_DLL"
54864      has_space=`$ECHO "$path" | $GREP " "`
54865      if test "x$has_space" != x; then
54866        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54867$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54868        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54869      fi
54870
54871      # Use eval to expand a potential ~
54872      eval path="$path"
54873      if test ! -f "$path" && test ! -d "$path"; then
54874        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54875      fi
54876
54877      if test -d "$path"; then
54878        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54879      else
54880        dir="`$DIRNAME "$path"`"
54881        base="`$BASENAME "$path"`"
54882        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54883      fi
54884    fi
54885  fi
54886
54887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54888$as_echo_n "checking for $DLL_NAME... " >&6; }
54889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54890$as_echo "$MSVC_DLL" >&6; }
54891    else
54892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54893$as_echo "incorrect, ignoring" >&6; }
54894      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54895$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54896    fi
54897  fi
54898
54899      if test "x$MSVC_DLL" = x; then
54900        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54901      fi
54902      MSVCP_DLL="$MSVC_DLL"
54903    else
54904
54905  DLL_NAME="${MSVCP_NAME}"
54906  MSVC_DLL=
54907
54908  if test "x$MSVC_DLL" = x; then
54909    # Probe: Using well-known location from Visual Studio 10.0
54910    if test "x$VCINSTALLDIR" != x; then
54911      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54912
54913  windows_path="$CYGWIN_VC_INSTALL_DIR"
54914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54915    unix_path=`$CYGPATH -u "$windows_path"`
54916    CYGWIN_VC_INSTALL_DIR="$unix_path"
54917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54919    CYGWIN_VC_INSTALL_DIR="$unix_path"
54920  fi
54921
54922      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54923        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54924      else
54925        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54926      fi
54927      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54928
54929  DLL_NAME="$DLL_NAME"
54930  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54931  METHOD="well-known location in VCINSTALLDIR"
54932  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54933    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54934$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54935
54936    # Need to check if the found msvcr is correct architecture
54937    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54938$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54939    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54940    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54941      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54942      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54943      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54944        CORRECT_MSVCR_ARCH="PE32 executable"
54945      else
54946        CORRECT_MSVCR_ARCH="PE32+ executable"
54947      fi
54948    else
54949      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54950        CORRECT_MSVCR_ARCH=386
54951      else
54952        CORRECT_MSVCR_ARCH=x86-64
54953      fi
54954    fi
54955    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54957$as_echo "ok" >&6; }
54958      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54959
54960  # Only process if variable expands to non-empty
54961
54962  if test "x$MSVC_DLL" != x; then
54963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54964
54965  # Input might be given as Windows format, start by converting to
54966  # unix format.
54967  path="$MSVC_DLL"
54968  new_path=`$CYGPATH -u "$path"`
54969
54970  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54971  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54972  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54973  # "foo.exe" is OK but "foo" is an error.
54974  #
54975  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54976  # It is also a way to make sure we got the proper file name for the real test later on.
54977  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54978  if test "x$test_shortpath" = x; then
54979    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54980$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54981    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54982  fi
54983
54984  # Call helper function which possibly converts this using DOS-style short mode.
54985  # If so, the updated path is stored in $new_path.
54986
54987  input_path="$new_path"
54988  # Check if we need to convert this using DOS-style short mode. If the path
54989  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54990  # take no chances and rewrite it.
54991  # Note: m4 eats our [], so we need to use [ and ] instead.
54992  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54993  if test "x$has_forbidden_chars" != x; then
54994    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54995    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54996    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54997    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54998      # Going to short mode and back again did indeed matter. Since short mode is
54999      # case insensitive, let's make it lowercase to improve readability.
55000      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55001      # Now convert it back to Unix-style (cygpath)
55002      input_path=`$CYGPATH -u "$shortmode_path"`
55003      new_path="$input_path"
55004    fi
55005  fi
55006
55007  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55008  if test "x$test_cygdrive_prefix" = x; then
55009    # As a simple fix, exclude /usr/bin since it's not a real path.
55010    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55011      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55012      # a path prefixed by /cygdrive for fixpath to work.
55013      new_path="$CYGWIN_ROOT_PATH$input_path"
55014    fi
55015  fi
55016
55017
55018  if test "x$path" != "x$new_path"; then
55019    MSVC_DLL="$new_path"
55020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55021$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55022  fi
55023
55024    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55025
55026  path="$MSVC_DLL"
55027  has_colon=`$ECHO $path | $GREP ^.:`
55028  new_path="$path"
55029  if test "x$has_colon" = x; then
55030    # Not in mixed or Windows style, start by that.
55031    new_path=`cmd //c echo $path`
55032  fi
55033
55034
55035  input_path="$new_path"
55036  # Check if we need to convert this using DOS-style short mode. If the path
55037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55038  # take no chances and rewrite it.
55039  # Note: m4 eats our [], so we need to use [ and ] instead.
55040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55041  if test "x$has_forbidden_chars" != x; then
55042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55043    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55044  fi
55045
55046
55047  windows_path="$new_path"
55048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55049    unix_path=`$CYGPATH -u "$windows_path"`
55050    new_path="$unix_path"
55051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55053    new_path="$unix_path"
55054  fi
55055
55056  if test "x$path" != "x$new_path"; then
55057    MSVC_DLL="$new_path"
55058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55059$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55060  fi
55061
55062  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55063  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55064
55065    else
55066      # We're on a unix platform. Hooray! :)
55067      path="$MSVC_DLL"
55068      has_space=`$ECHO "$path" | $GREP " "`
55069      if test "x$has_space" != x; then
55070        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55071$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55072        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55073      fi
55074
55075      # Use eval to expand a potential ~
55076      eval path="$path"
55077      if test ! -f "$path" && test ! -d "$path"; then
55078        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55079      fi
55080
55081      if test -d "$path"; then
55082        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55083      else
55084        dir="`$DIRNAME "$path"`"
55085        base="`$BASENAME "$path"`"
55086        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55087      fi
55088    fi
55089  fi
55090
55091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55092$as_echo_n "checking for $DLL_NAME... " >&6; }
55093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55094$as_echo "$MSVC_DLL" >&6; }
55095    else
55096      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55097$as_echo "incorrect, ignoring" >&6; }
55098      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55099$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55100    fi
55101  fi
55102
55103    fi
55104  fi
55105
55106  if test "x$MSVC_DLL" = x; then
55107    # Probe: Check in the Boot JDK directory.
55108    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55109
55110  DLL_NAME="$DLL_NAME"
55111  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55112  METHOD="well-known location in Boot JDK"
55113  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55114    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55115$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55116
55117    # Need to check if the found msvcr is correct architecture
55118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55119$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55120    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55122      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55123      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55124      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55125        CORRECT_MSVCR_ARCH="PE32 executable"
55126      else
55127        CORRECT_MSVCR_ARCH="PE32+ executable"
55128      fi
55129    else
55130      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55131        CORRECT_MSVCR_ARCH=386
55132      else
55133        CORRECT_MSVCR_ARCH=x86-64
55134      fi
55135    fi
55136    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55137      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55138$as_echo "ok" >&6; }
55139      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55140
55141  # Only process if variable expands to non-empty
55142
55143  if test "x$MSVC_DLL" != x; then
55144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55145
55146  # Input might be given as Windows format, start by converting to
55147  # unix format.
55148  path="$MSVC_DLL"
55149  new_path=`$CYGPATH -u "$path"`
55150
55151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55154  # "foo.exe" is OK but "foo" is an error.
55155  #
55156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55157  # It is also a way to make sure we got the proper file name for the real test later on.
55158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55159  if test "x$test_shortpath" = x; then
55160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55161$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55162    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55163  fi
55164
55165  # Call helper function which possibly converts this using DOS-style short mode.
55166  # If so, the updated path is stored in $new_path.
55167
55168  input_path="$new_path"
55169  # Check if we need to convert this using DOS-style short mode. If the path
55170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55171  # take no chances and rewrite it.
55172  # Note: m4 eats our [], so we need to use [ and ] instead.
55173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55174  if test "x$has_forbidden_chars" != x; then
55175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55179      # Going to short mode and back again did indeed matter. Since short mode is
55180      # case insensitive, let's make it lowercase to improve readability.
55181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55182      # Now convert it back to Unix-style (cygpath)
55183      input_path=`$CYGPATH -u "$shortmode_path"`
55184      new_path="$input_path"
55185    fi
55186  fi
55187
55188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55189  if test "x$test_cygdrive_prefix" = x; then
55190    # As a simple fix, exclude /usr/bin since it's not a real path.
55191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55193      # a path prefixed by /cygdrive for fixpath to work.
55194      new_path="$CYGWIN_ROOT_PATH$input_path"
55195    fi
55196  fi
55197
55198
55199  if test "x$path" != "x$new_path"; then
55200    MSVC_DLL="$new_path"
55201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55202$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55203  fi
55204
55205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55206
55207  path="$MSVC_DLL"
55208  has_colon=`$ECHO $path | $GREP ^.:`
55209  new_path="$path"
55210  if test "x$has_colon" = x; then
55211    # Not in mixed or Windows style, start by that.
55212    new_path=`cmd //c echo $path`
55213  fi
55214
55215
55216  input_path="$new_path"
55217  # Check if we need to convert this using DOS-style short mode. If the path
55218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55219  # take no chances and rewrite it.
55220  # Note: m4 eats our [], so we need to use [ and ] instead.
55221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55222  if test "x$has_forbidden_chars" != x; then
55223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55225  fi
55226
55227
55228  windows_path="$new_path"
55229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55230    unix_path=`$CYGPATH -u "$windows_path"`
55231    new_path="$unix_path"
55232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55234    new_path="$unix_path"
55235  fi
55236
55237  if test "x$path" != "x$new_path"; then
55238    MSVC_DLL="$new_path"
55239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55240$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55241  fi
55242
55243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55245
55246    else
55247      # We're on a unix platform. Hooray! :)
55248      path="$MSVC_DLL"
55249      has_space=`$ECHO "$path" | $GREP " "`
55250      if test "x$has_space" != x; then
55251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55252$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55254      fi
55255
55256      # Use eval to expand a potential ~
55257      eval path="$path"
55258      if test ! -f "$path" && test ! -d "$path"; then
55259        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55260      fi
55261
55262      if test -d "$path"; then
55263        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55264      else
55265        dir="`$DIRNAME "$path"`"
55266        base="`$BASENAME "$path"`"
55267        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55268      fi
55269    fi
55270  fi
55271
55272      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55273$as_echo_n "checking for $DLL_NAME... " >&6; }
55274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55275$as_echo "$MSVC_DLL" >&6; }
55276    else
55277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55278$as_echo "incorrect, ignoring" >&6; }
55279      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55280$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55281    fi
55282  fi
55283
55284  fi
55285
55286  if test "x$MSVC_DLL" = x; then
55287    # Probe: Look in the Windows system32 directory
55288    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55289
55290  windows_path="$CYGWIN_SYSTEMROOT"
55291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55292    unix_path=`$CYGPATH -u "$windows_path"`
55293    CYGWIN_SYSTEMROOT="$unix_path"
55294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55296    CYGWIN_SYSTEMROOT="$unix_path"
55297  fi
55298
55299    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55300
55301  DLL_NAME="$DLL_NAME"
55302  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55303  METHOD="well-known location in SYSTEMROOT"
55304  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55305    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55306$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55307
55308    # Need to check if the found msvcr is correct architecture
55309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55310$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55311    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55313      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55314      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55315      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55316        CORRECT_MSVCR_ARCH="PE32 executable"
55317      else
55318        CORRECT_MSVCR_ARCH="PE32+ executable"
55319      fi
55320    else
55321      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55322        CORRECT_MSVCR_ARCH=386
55323      else
55324        CORRECT_MSVCR_ARCH=x86-64
55325      fi
55326    fi
55327    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55328      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55329$as_echo "ok" >&6; }
55330      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55331
55332  # Only process if variable expands to non-empty
55333
55334  if test "x$MSVC_DLL" != x; then
55335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55336
55337  # Input might be given as Windows format, start by converting to
55338  # unix format.
55339  path="$MSVC_DLL"
55340  new_path=`$CYGPATH -u "$path"`
55341
55342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55345  # "foo.exe" is OK but "foo" is an error.
55346  #
55347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55348  # It is also a way to make sure we got the proper file name for the real test later on.
55349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55350  if test "x$test_shortpath" = x; then
55351    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55352$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55353    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55354  fi
55355
55356  # Call helper function which possibly converts this using DOS-style short mode.
55357  # If so, the updated path is stored in $new_path.
55358
55359  input_path="$new_path"
55360  # Check if we need to convert this using DOS-style short mode. If the path
55361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55362  # take no chances and rewrite it.
55363  # Note: m4 eats our [], so we need to use [ and ] instead.
55364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55365  if test "x$has_forbidden_chars" != x; then
55366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55370      # Going to short mode and back again did indeed matter. Since short mode is
55371      # case insensitive, let's make it lowercase to improve readability.
55372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55373      # Now convert it back to Unix-style (cygpath)
55374      input_path=`$CYGPATH -u "$shortmode_path"`
55375      new_path="$input_path"
55376    fi
55377  fi
55378
55379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55380  if test "x$test_cygdrive_prefix" = x; then
55381    # As a simple fix, exclude /usr/bin since it's not a real path.
55382    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55384      # a path prefixed by /cygdrive for fixpath to work.
55385      new_path="$CYGWIN_ROOT_PATH$input_path"
55386    fi
55387  fi
55388
55389
55390  if test "x$path" != "x$new_path"; then
55391    MSVC_DLL="$new_path"
55392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55393$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55394  fi
55395
55396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55397
55398  path="$MSVC_DLL"
55399  has_colon=`$ECHO $path | $GREP ^.:`
55400  new_path="$path"
55401  if test "x$has_colon" = x; then
55402    # Not in mixed or Windows style, start by that.
55403    new_path=`cmd //c echo $path`
55404  fi
55405
55406
55407  input_path="$new_path"
55408  # Check if we need to convert this using DOS-style short mode. If the path
55409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55410  # take no chances and rewrite it.
55411  # Note: m4 eats our [], so we need to use [ and ] instead.
55412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55413  if test "x$has_forbidden_chars" != x; then
55414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55415    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55416  fi
55417
55418
55419  windows_path="$new_path"
55420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55421    unix_path=`$CYGPATH -u "$windows_path"`
55422    new_path="$unix_path"
55423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55425    new_path="$unix_path"
55426  fi
55427
55428  if test "x$path" != "x$new_path"; then
55429    MSVC_DLL="$new_path"
55430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55431$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55432  fi
55433
55434  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55435  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55436
55437    else
55438      # We're on a unix platform. Hooray! :)
55439      path="$MSVC_DLL"
55440      has_space=`$ECHO "$path" | $GREP " "`
55441      if test "x$has_space" != x; then
55442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55443$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55444        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55445      fi
55446
55447      # Use eval to expand a potential ~
55448      eval path="$path"
55449      if test ! -f "$path" && test ! -d "$path"; then
55450        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55451      fi
55452
55453      if test -d "$path"; then
55454        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55455      else
55456        dir="`$DIRNAME "$path"`"
55457        base="`$BASENAME "$path"`"
55458        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55459      fi
55460    fi
55461  fi
55462
55463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55464$as_echo_n "checking for $DLL_NAME... " >&6; }
55465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55466$as_echo "$MSVC_DLL" >&6; }
55467    else
55468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55469$as_echo "incorrect, ignoring" >&6; }
55470      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55471$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55472    fi
55473  fi
55474
55475  fi
55476
55477  if test "x$MSVC_DLL" = x; then
55478    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55479    if test "x$VS100COMNTOOLS" != x; then
55480      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55481
55482  windows_path="$CYGWIN_VS_TOOLS_DIR"
55483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55484    unix_path=`$CYGPATH -u "$windows_path"`
55485    CYGWIN_VS_TOOLS_DIR="$unix_path"
55486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55488    CYGWIN_VS_TOOLS_DIR="$unix_path"
55489  fi
55490
55491      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55492        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55493	    | $GREP -i /x64/ | $HEAD --lines 1`
55494      else
55495        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55496	    | $GREP -i /x86/ | $HEAD --lines 1`
55497      fi
55498
55499  DLL_NAME="$DLL_NAME"
55500  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55501  METHOD="search of VS100COMNTOOLS"
55502  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55503    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55504$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55505
55506    # Need to check if the found msvcr is correct architecture
55507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55508$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55509    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55511      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55512      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55513      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55514        CORRECT_MSVCR_ARCH="PE32 executable"
55515      else
55516        CORRECT_MSVCR_ARCH="PE32+ executable"
55517      fi
55518    else
55519      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55520        CORRECT_MSVCR_ARCH=386
55521      else
55522        CORRECT_MSVCR_ARCH=x86-64
55523      fi
55524    fi
55525    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55526      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55527$as_echo "ok" >&6; }
55528      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55529
55530  # Only process if variable expands to non-empty
55531
55532  if test "x$MSVC_DLL" != x; then
55533    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55534
55535  # Input might be given as Windows format, start by converting to
55536  # unix format.
55537  path="$MSVC_DLL"
55538  new_path=`$CYGPATH -u "$path"`
55539
55540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55543  # "foo.exe" is OK but "foo" is an error.
55544  #
55545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55546  # It is also a way to make sure we got the proper file name for the real test later on.
55547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55548  if test "x$test_shortpath" = x; then
55549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55550$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55551    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55552  fi
55553
55554  # Call helper function which possibly converts this using DOS-style short mode.
55555  # If so, the updated path is stored in $new_path.
55556
55557  input_path="$new_path"
55558  # Check if we need to convert this using DOS-style short mode. If the path
55559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55560  # take no chances and rewrite it.
55561  # Note: m4 eats our [], so we need to use [ and ] instead.
55562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55563  if test "x$has_forbidden_chars" != x; then
55564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55568      # Going to short mode and back again did indeed matter. Since short mode is
55569      # case insensitive, let's make it lowercase to improve readability.
55570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55571      # Now convert it back to Unix-style (cygpath)
55572      input_path=`$CYGPATH -u "$shortmode_path"`
55573      new_path="$input_path"
55574    fi
55575  fi
55576
55577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55578  if test "x$test_cygdrive_prefix" = x; then
55579    # As a simple fix, exclude /usr/bin since it's not a real path.
55580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55582      # a path prefixed by /cygdrive for fixpath to work.
55583      new_path="$CYGWIN_ROOT_PATH$input_path"
55584    fi
55585  fi
55586
55587
55588  if test "x$path" != "x$new_path"; then
55589    MSVC_DLL="$new_path"
55590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55591$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55592  fi
55593
55594    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55595
55596  path="$MSVC_DLL"
55597  has_colon=`$ECHO $path | $GREP ^.:`
55598  new_path="$path"
55599  if test "x$has_colon" = x; then
55600    # Not in mixed or Windows style, start by that.
55601    new_path=`cmd //c echo $path`
55602  fi
55603
55604
55605  input_path="$new_path"
55606  # Check if we need to convert this using DOS-style short mode. If the path
55607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55608  # take no chances and rewrite it.
55609  # Note: m4 eats our [], so we need to use [ and ] instead.
55610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55611  if test "x$has_forbidden_chars" != x; then
55612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55614  fi
55615
55616
55617  windows_path="$new_path"
55618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55619    unix_path=`$CYGPATH -u "$windows_path"`
55620    new_path="$unix_path"
55621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55623    new_path="$unix_path"
55624  fi
55625
55626  if test "x$path" != "x$new_path"; then
55627    MSVC_DLL="$new_path"
55628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55629$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55630  fi
55631
55632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55634
55635    else
55636      # We're on a unix platform. Hooray! :)
55637      path="$MSVC_DLL"
55638      has_space=`$ECHO "$path" | $GREP " "`
55639      if test "x$has_space" != x; then
55640        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55641$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55642        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55643      fi
55644
55645      # Use eval to expand a potential ~
55646      eval path="$path"
55647      if test ! -f "$path" && test ! -d "$path"; then
55648        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55649      fi
55650
55651      if test -d "$path"; then
55652        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55653      else
55654        dir="`$DIRNAME "$path"`"
55655        base="`$BASENAME "$path"`"
55656        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55657      fi
55658    fi
55659  fi
55660
55661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55662$as_echo_n "checking for $DLL_NAME... " >&6; }
55663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55664$as_echo "$MSVC_DLL" >&6; }
55665    else
55666      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55667$as_echo "incorrect, ignoring" >&6; }
55668      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55669$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55670    fi
55671  fi
55672
55673    fi
55674  fi
55675
55676  if test "x$MSVC_DLL" = x; then
55677    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55678    # (This was the original behaviour; kept since it might turn something up)
55679    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55680      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55681        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55682	    | $GREP x64 | $HEAD --lines 1`
55683      else
55684        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55685	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55686        if test "x$POSSIBLE_MSVC_DLL" = x; then
55687          # We're grasping at straws now...
55688          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55689	      | $HEAD --lines 1`
55690        fi
55691      fi
55692
55693
55694  DLL_NAME="$DLL_NAME"
55695  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55696  METHOD="search of VCINSTALLDIR"
55697  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55699$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55700
55701    # Need to check if the found msvcr is correct architecture
55702    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55703$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55704    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55705    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55706      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55707      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55708      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55709        CORRECT_MSVCR_ARCH="PE32 executable"
55710      else
55711        CORRECT_MSVCR_ARCH="PE32+ executable"
55712      fi
55713    else
55714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55715        CORRECT_MSVCR_ARCH=386
55716      else
55717        CORRECT_MSVCR_ARCH=x86-64
55718      fi
55719    fi
55720    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55721      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55722$as_echo "ok" >&6; }
55723      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55724
55725  # Only process if variable expands to non-empty
55726
55727  if test "x$MSVC_DLL" != x; then
55728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55729
55730  # Input might be given as Windows format, start by converting to
55731  # unix format.
55732  path="$MSVC_DLL"
55733  new_path=`$CYGPATH -u "$path"`
55734
55735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55738  # "foo.exe" is OK but "foo" is an error.
55739  #
55740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55741  # It is also a way to make sure we got the proper file name for the real test later on.
55742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55743  if test "x$test_shortpath" = x; then
55744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55745$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55746    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55747  fi
55748
55749  # Call helper function which possibly converts this using DOS-style short mode.
55750  # If so, the updated path is stored in $new_path.
55751
55752  input_path="$new_path"
55753  # Check if we need to convert this using DOS-style short mode. If the path
55754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55755  # take no chances and rewrite it.
55756  # Note: m4 eats our [], so we need to use [ and ] instead.
55757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55758  if test "x$has_forbidden_chars" != x; then
55759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55763      # Going to short mode and back again did indeed matter. Since short mode is
55764      # case insensitive, let's make it lowercase to improve readability.
55765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55766      # Now convert it back to Unix-style (cygpath)
55767      input_path=`$CYGPATH -u "$shortmode_path"`
55768      new_path="$input_path"
55769    fi
55770  fi
55771
55772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55773  if test "x$test_cygdrive_prefix" = x; then
55774    # As a simple fix, exclude /usr/bin since it's not a real path.
55775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55777      # a path prefixed by /cygdrive for fixpath to work.
55778      new_path="$CYGWIN_ROOT_PATH$input_path"
55779    fi
55780  fi
55781
55782
55783  if test "x$path" != "x$new_path"; then
55784    MSVC_DLL="$new_path"
55785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55786$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55787  fi
55788
55789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55790
55791  path="$MSVC_DLL"
55792  has_colon=`$ECHO $path | $GREP ^.:`
55793  new_path="$path"
55794  if test "x$has_colon" = x; then
55795    # Not in mixed or Windows style, start by that.
55796    new_path=`cmd //c echo $path`
55797  fi
55798
55799
55800  input_path="$new_path"
55801  # Check if we need to convert this using DOS-style short mode. If the path
55802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55803  # take no chances and rewrite it.
55804  # Note: m4 eats our [], so we need to use [ and ] instead.
55805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55806  if test "x$has_forbidden_chars" != x; then
55807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55809  fi
55810
55811
55812  windows_path="$new_path"
55813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55814    unix_path=`$CYGPATH -u "$windows_path"`
55815    new_path="$unix_path"
55816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55818    new_path="$unix_path"
55819  fi
55820
55821  if test "x$path" != "x$new_path"; then
55822    MSVC_DLL="$new_path"
55823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55824$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55825  fi
55826
55827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55829
55830    else
55831      # We're on a unix platform. Hooray! :)
55832      path="$MSVC_DLL"
55833      has_space=`$ECHO "$path" | $GREP " "`
55834      if test "x$has_space" != x; then
55835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55836$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55838      fi
55839
55840      # Use eval to expand a potential ~
55841      eval path="$path"
55842      if test ! -f "$path" && test ! -d "$path"; then
55843        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55844      fi
55845
55846      if test -d "$path"; then
55847        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55848      else
55849        dir="`$DIRNAME "$path"`"
55850        base="`$BASENAME "$path"`"
55851        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55852      fi
55853    fi
55854  fi
55855
55856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55857$as_echo_n "checking for $DLL_NAME... " >&6; }
55858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55859$as_echo "$MSVC_DLL" >&6; }
55860    else
55861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55862$as_echo "incorrect, ignoring" >&6; }
55863      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55864$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55865    fi
55866  fi
55867
55868    fi
55869  fi
55870
55871  if test "x$MSVC_DLL" = x; then
55872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55873$as_echo_n "checking for $DLL_NAME... " >&6; }
55874    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55875$as_echo "no" >&6; }
55876    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55877  fi
55878
55879      MSVCP_DLL="$MSVC_DLL"
55880    fi
55881
55882  fi
55883
55884  fi
55885
55886
55887  if test "x$NEEDS_LIB_X11" = xfalse; then
55888    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55889      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55890$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55891    fi
55892    X_CFLAGS=
55893    X_LIBS=
55894  else
55895
55896    if test "x${with_x}" = xno; then
55897      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55898    fi
55899
55900    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55901      # The user has specified a X11 base directory. Use it for includes and
55902      # libraries, unless explicitely overridden.
55903      if test "x$x_includes" = xNONE; then
55904        x_includes="${with_x}/include"
55905      fi
55906      if test "x$x_libraries" = xNONE; then
55907        x_libraries="${with_x}/lib"
55908      fi
55909    else
55910      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55911      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55912      # --x-libraries for the sysroot, if that seems to be correct.
55913      if test "x$SYSROOT" != "x"; then
55914        if test "x$x_includes" = xNONE; then
55915          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55916            x_includes="$SYSROOT/usr/X11R6/include"
55917          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55918            x_includes="$SYSROOT/usr/include"
55919          fi
55920        fi
55921        if test "x$x_libraries" = xNONE; then
55922          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55923            x_libraries="$SYSROOT/usr/X11R6/lib"
55924          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55925            x_libraries="$SYSROOT/usr/lib64"
55926          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55927            x_libraries="$SYSROOT/usr/lib"
55928          fi
55929        fi
55930      fi
55931    fi
55932
55933    # Now let autoconf do it's magic
55934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55935$as_echo_n "checking for X... " >&6; }
55936
55937
55938# Check whether --with-x was given.
55939if test "${with_x+set}" = set; then :
55940  withval=$with_x;
55941fi
55942
55943# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55944if test "x$with_x" = xno; then
55945  # The user explicitly disabled X.
55946  have_x=disabled
55947else
55948  case $x_includes,$x_libraries in #(
55949    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55950    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55951  $as_echo_n "(cached) " >&6
55952else
55953  # One or both of the vars are not set, and there is no cached value.
55954ac_x_includes=no ac_x_libraries=no
55955rm -f -r conftest.dir
55956if mkdir conftest.dir; then
55957  cd conftest.dir
55958  cat >Imakefile <<'_ACEOF'
55959incroot:
55960	@echo incroot='${INCROOT}'
55961usrlibdir:
55962	@echo usrlibdir='${USRLIBDIR}'
55963libdir:
55964	@echo libdir='${LIBDIR}'
55965_ACEOF
55966  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55967    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55968    for ac_var in incroot usrlibdir libdir; do
55969      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55970    done
55971    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55972    for ac_extension in a so sl dylib la dll; do
55973      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55974	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55975	ac_im_usrlibdir=$ac_im_libdir; break
55976      fi
55977    done
55978    # Screen out bogus values from the imake configuration.  They are
55979    # bogus both because they are the default anyway, and because
55980    # using them would break gcc on systems where it needs fixed includes.
55981    case $ac_im_incroot in
55982	/usr/include) ac_x_includes= ;;
55983	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55984    esac
55985    case $ac_im_usrlibdir in
55986	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55987	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55988    esac
55989  fi
55990  cd ..
55991  rm -f -r conftest.dir
55992fi
55993
55994# Standard set of common directories for X headers.
55995# Check X11 before X11Rn because it is often a symlink to the current release.
55996ac_x_header_dirs='
55997/usr/X11/include
55998/usr/X11R7/include
55999/usr/X11R6/include
56000/usr/X11R5/include
56001/usr/X11R4/include
56002
56003/usr/include/X11
56004/usr/include/X11R7
56005/usr/include/X11R6
56006/usr/include/X11R5
56007/usr/include/X11R4
56008
56009/usr/local/X11/include
56010/usr/local/X11R7/include
56011/usr/local/X11R6/include
56012/usr/local/X11R5/include
56013/usr/local/X11R4/include
56014
56015/usr/local/include/X11
56016/usr/local/include/X11R7
56017/usr/local/include/X11R6
56018/usr/local/include/X11R5
56019/usr/local/include/X11R4
56020
56021/usr/X386/include
56022/usr/x386/include
56023/usr/XFree86/include/X11
56024
56025/usr/include
56026/usr/local/include
56027/usr/unsupported/include
56028/usr/athena/include
56029/usr/local/x11r5/include
56030/usr/lpp/Xamples/include
56031
56032/usr/openwin/include
56033/usr/openwin/share/include'
56034
56035if test "$ac_x_includes" = no; then
56036  # Guess where to find include files, by looking for Xlib.h.
56037  # First, try using that file with no special directory specified.
56038  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56039/* end confdefs.h.  */
56040#include <X11/Xlib.h>
56041_ACEOF
56042if ac_fn_cxx_try_cpp "$LINENO"; then :
56043  # We can compile using X headers with no special include directory.
56044ac_x_includes=
56045else
56046  for ac_dir in $ac_x_header_dirs; do
56047  if test -r "$ac_dir/X11/Xlib.h"; then
56048    ac_x_includes=$ac_dir
56049    break
56050  fi
56051done
56052fi
56053rm -f conftest.err conftest.i conftest.$ac_ext
56054fi # $ac_x_includes = no
56055
56056if test "$ac_x_libraries" = no; then
56057  # Check for the libraries.
56058  # See if we find them without any special options.
56059  # Don't add to $LIBS permanently.
56060  ac_save_LIBS=$LIBS
56061  LIBS="-lX11 $LIBS"
56062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56063/* end confdefs.h.  */
56064#include <X11/Xlib.h>
56065int
56066main ()
56067{
56068XrmInitialize ()
56069  ;
56070  return 0;
56071}
56072_ACEOF
56073if ac_fn_cxx_try_link "$LINENO"; then :
56074  LIBS=$ac_save_LIBS
56075# We can link X programs with no special library path.
56076ac_x_libraries=
56077else
56078  LIBS=$ac_save_LIBS
56079for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56080do
56081  # Don't even attempt the hair of trying to link an X program!
56082  for ac_extension in a so sl dylib la dll; do
56083    if test -r "$ac_dir/libX11.$ac_extension"; then
56084      ac_x_libraries=$ac_dir
56085      break 2
56086    fi
56087  done
56088done
56089fi
56090rm -f core conftest.err conftest.$ac_objext \
56091    conftest$ac_exeext conftest.$ac_ext
56092fi # $ac_x_libraries = no
56093
56094case $ac_x_includes,$ac_x_libraries in #(
56095  no,* | *,no | *\'*)
56096    # Didn't find X, or a directory has "'" in its name.
56097    ac_cv_have_x="have_x=no";; #(
56098  *)
56099    # Record where we found X for the cache.
56100    ac_cv_have_x="have_x=yes\
56101	ac_x_includes='$ac_x_includes'\
56102	ac_x_libraries='$ac_x_libraries'"
56103esac
56104fi
56105;; #(
56106    *) have_x=yes;;
56107  esac
56108  eval "$ac_cv_have_x"
56109fi # $with_x != no
56110
56111if test "$have_x" != yes; then
56112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56113$as_echo "$have_x" >&6; }
56114  no_x=yes
56115else
56116  # If each of the values was on the command line, it overrides each guess.
56117  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56118  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56119  # Update the cache value to reflect the command line values.
56120  ac_cv_have_x="have_x=yes\
56121	ac_x_includes='$x_includes'\
56122	ac_x_libraries='$x_libraries'"
56123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56124$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56125fi
56126
56127    if test "$no_x" = yes; then
56128  # Not all programs may use this symbol, but it does not hurt to define it.
56129
56130$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56131
56132  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56133else
56134  if test -n "$x_includes"; then
56135    X_CFLAGS="$X_CFLAGS -I$x_includes"
56136  fi
56137
56138  # It would also be nice to do this for all -L options, not just this one.
56139  if test -n "$x_libraries"; then
56140    X_LIBS="$X_LIBS -L$x_libraries"
56141    # For Solaris; some versions of Sun CC require a space after -R and
56142    # others require no space.  Words are not sufficient . . . .
56143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56144$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56145    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56146    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56147    ac_cxx_werror_flag=yes
56148    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56149/* end confdefs.h.  */
56150
56151int
56152main ()
56153{
56154
56155  ;
56156  return 0;
56157}
56158_ACEOF
56159if ac_fn_cxx_try_link "$LINENO"; then :
56160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56161$as_echo "no" >&6; }
56162       X_LIBS="$X_LIBS -R$x_libraries"
56163else
56164  LIBS="$ac_xsave_LIBS -R $x_libraries"
56165       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56166/* end confdefs.h.  */
56167
56168int
56169main ()
56170{
56171
56172  ;
56173  return 0;
56174}
56175_ACEOF
56176if ac_fn_cxx_try_link "$LINENO"; then :
56177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56178$as_echo "yes" >&6; }
56179	  X_LIBS="$X_LIBS -R $x_libraries"
56180else
56181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56182$as_echo "neither works" >&6; }
56183fi
56184rm -f core conftest.err conftest.$ac_objext \
56185    conftest$ac_exeext conftest.$ac_ext
56186fi
56187rm -f core conftest.err conftest.$ac_objext \
56188    conftest$ac_exeext conftest.$ac_ext
56189    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56190    LIBS=$ac_xsave_LIBS
56191  fi
56192
56193  # Check for system-dependent libraries X programs must link with.
56194  # Do this before checking for the system-independent R6 libraries
56195  # (-lICE), since we may need -lsocket or whatever for X linking.
56196
56197  if test "$ISC" = yes; then
56198    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56199  else
56200    # Martyn Johnson says this is needed for Ultrix, if the X
56201    # libraries were built with DECnet support.  And Karl Berry says
56202    # the Alpha needs dnet_stub (dnet does not exist).
56203    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56204    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56205/* end confdefs.h.  */
56206
56207/* Override any GCC internal prototype to avoid an error.
56208   Use char because int might match the return type of a GCC
56209   builtin and then its argument prototype would still apply.  */
56210#ifdef __cplusplus
56211extern "C"
56212#endif
56213char XOpenDisplay ();
56214int
56215main ()
56216{
56217return XOpenDisplay ();
56218  ;
56219  return 0;
56220}
56221_ACEOF
56222if ac_fn_cxx_try_link "$LINENO"; then :
56223
56224else
56225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56226$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56227if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56228  $as_echo_n "(cached) " >&6
56229else
56230  ac_check_lib_save_LIBS=$LIBS
56231LIBS="-ldnet  $LIBS"
56232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56233/* end confdefs.h.  */
56234
56235/* Override any GCC internal prototype to avoid an error.
56236   Use char because int might match the return type of a GCC
56237   builtin and then its argument prototype would still apply.  */
56238#ifdef __cplusplus
56239extern "C"
56240#endif
56241char dnet_ntoa ();
56242int
56243main ()
56244{
56245return dnet_ntoa ();
56246  ;
56247  return 0;
56248}
56249_ACEOF
56250if ac_fn_cxx_try_link "$LINENO"; then :
56251  ac_cv_lib_dnet_dnet_ntoa=yes
56252else
56253  ac_cv_lib_dnet_dnet_ntoa=no
56254fi
56255rm -f core conftest.err conftest.$ac_objext \
56256    conftest$ac_exeext conftest.$ac_ext
56257LIBS=$ac_check_lib_save_LIBS
56258fi
56259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56260$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56261if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56262  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56263fi
56264
56265    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56266      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56267$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56268if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56269  $as_echo_n "(cached) " >&6
56270else
56271  ac_check_lib_save_LIBS=$LIBS
56272LIBS="-ldnet_stub  $LIBS"
56273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56274/* end confdefs.h.  */
56275
56276/* Override any GCC internal prototype to avoid an error.
56277   Use char because int might match the return type of a GCC
56278   builtin and then its argument prototype would still apply.  */
56279#ifdef __cplusplus
56280extern "C"
56281#endif
56282char dnet_ntoa ();
56283int
56284main ()
56285{
56286return dnet_ntoa ();
56287  ;
56288  return 0;
56289}
56290_ACEOF
56291if ac_fn_cxx_try_link "$LINENO"; then :
56292  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56293else
56294  ac_cv_lib_dnet_stub_dnet_ntoa=no
56295fi
56296rm -f core conftest.err conftest.$ac_objext \
56297    conftest$ac_exeext conftest.$ac_ext
56298LIBS=$ac_check_lib_save_LIBS
56299fi
56300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56301$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56302if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56303  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56304fi
56305
56306    fi
56307fi
56308rm -f core conftest.err conftest.$ac_objext \
56309    conftest$ac_exeext conftest.$ac_ext
56310    LIBS="$ac_xsave_LIBS"
56311
56312    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56313    # to get the SysV transport functions.
56314    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56315    # needs -lnsl.
56316    # The nsl library prevents programs from opening the X display
56317    # on Irix 5.2, according to T.E. Dickey.
56318    # The functions gethostbyname, getservbyname, and inet_addr are
56319    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56320    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56321if test "x$ac_cv_func_gethostbyname" = xyes; then :
56322
56323fi
56324
56325    if test $ac_cv_func_gethostbyname = no; then
56326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56327$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56328if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56329  $as_echo_n "(cached) " >&6
56330else
56331  ac_check_lib_save_LIBS=$LIBS
56332LIBS="-lnsl  $LIBS"
56333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56334/* end confdefs.h.  */
56335
56336/* Override any GCC internal prototype to avoid an error.
56337   Use char because int might match the return type of a GCC
56338   builtin and then its argument prototype would still apply.  */
56339#ifdef __cplusplus
56340extern "C"
56341#endif
56342char gethostbyname ();
56343int
56344main ()
56345{
56346return gethostbyname ();
56347  ;
56348  return 0;
56349}
56350_ACEOF
56351if ac_fn_cxx_try_link "$LINENO"; then :
56352  ac_cv_lib_nsl_gethostbyname=yes
56353else
56354  ac_cv_lib_nsl_gethostbyname=no
56355fi
56356rm -f core conftest.err conftest.$ac_objext \
56357    conftest$ac_exeext conftest.$ac_ext
56358LIBS=$ac_check_lib_save_LIBS
56359fi
56360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56361$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56362if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56363  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56364fi
56365
56366      if test $ac_cv_lib_nsl_gethostbyname = no; then
56367	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56368$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56369if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56370  $as_echo_n "(cached) " >&6
56371else
56372  ac_check_lib_save_LIBS=$LIBS
56373LIBS="-lbsd  $LIBS"
56374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56375/* end confdefs.h.  */
56376
56377/* Override any GCC internal prototype to avoid an error.
56378   Use char because int might match the return type of a GCC
56379   builtin and then its argument prototype would still apply.  */
56380#ifdef __cplusplus
56381extern "C"
56382#endif
56383char gethostbyname ();
56384int
56385main ()
56386{
56387return gethostbyname ();
56388  ;
56389  return 0;
56390}
56391_ACEOF
56392if ac_fn_cxx_try_link "$LINENO"; then :
56393  ac_cv_lib_bsd_gethostbyname=yes
56394else
56395  ac_cv_lib_bsd_gethostbyname=no
56396fi
56397rm -f core conftest.err conftest.$ac_objext \
56398    conftest$ac_exeext conftest.$ac_ext
56399LIBS=$ac_check_lib_save_LIBS
56400fi
56401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56402$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56403if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56404  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56405fi
56406
56407      fi
56408    fi
56409
56410    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56411    # socket/setsockopt and other routines are undefined under SCO ODT
56412    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56413    # on later versions), says Simon Leinen: it contains gethostby*
56414    # variants that don't use the name server (or something).  -lsocket
56415    # must be given before -lnsl if both are needed.  We assume that
56416    # if connect needs -lnsl, so does gethostbyname.
56417    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56418if test "x$ac_cv_func_connect" = xyes; then :
56419
56420fi
56421
56422    if test $ac_cv_func_connect = no; then
56423      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56424$as_echo_n "checking for connect in -lsocket... " >&6; }
56425if ${ac_cv_lib_socket_connect+:} false; then :
56426  $as_echo_n "(cached) " >&6
56427else
56428  ac_check_lib_save_LIBS=$LIBS
56429LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56431/* end confdefs.h.  */
56432
56433/* Override any GCC internal prototype to avoid an error.
56434   Use char because int might match the return type of a GCC
56435   builtin and then its argument prototype would still apply.  */
56436#ifdef __cplusplus
56437extern "C"
56438#endif
56439char connect ();
56440int
56441main ()
56442{
56443return connect ();
56444  ;
56445  return 0;
56446}
56447_ACEOF
56448if ac_fn_cxx_try_link "$LINENO"; then :
56449  ac_cv_lib_socket_connect=yes
56450else
56451  ac_cv_lib_socket_connect=no
56452fi
56453rm -f core conftest.err conftest.$ac_objext \
56454    conftest$ac_exeext conftest.$ac_ext
56455LIBS=$ac_check_lib_save_LIBS
56456fi
56457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56458$as_echo "$ac_cv_lib_socket_connect" >&6; }
56459if test "x$ac_cv_lib_socket_connect" = xyes; then :
56460  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56461fi
56462
56463    fi
56464
56465    # Guillermo Gomez says -lposix is necessary on A/UX.
56466    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56467if test "x$ac_cv_func_remove" = xyes; then :
56468
56469fi
56470
56471    if test $ac_cv_func_remove = no; then
56472      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56473$as_echo_n "checking for remove in -lposix... " >&6; }
56474if ${ac_cv_lib_posix_remove+:} false; then :
56475  $as_echo_n "(cached) " >&6
56476else
56477  ac_check_lib_save_LIBS=$LIBS
56478LIBS="-lposix  $LIBS"
56479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56480/* end confdefs.h.  */
56481
56482/* Override any GCC internal prototype to avoid an error.
56483   Use char because int might match the return type of a GCC
56484   builtin and then its argument prototype would still apply.  */
56485#ifdef __cplusplus
56486extern "C"
56487#endif
56488char remove ();
56489int
56490main ()
56491{
56492return remove ();
56493  ;
56494  return 0;
56495}
56496_ACEOF
56497if ac_fn_cxx_try_link "$LINENO"; then :
56498  ac_cv_lib_posix_remove=yes
56499else
56500  ac_cv_lib_posix_remove=no
56501fi
56502rm -f core conftest.err conftest.$ac_objext \
56503    conftest$ac_exeext conftest.$ac_ext
56504LIBS=$ac_check_lib_save_LIBS
56505fi
56506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56507$as_echo "$ac_cv_lib_posix_remove" >&6; }
56508if test "x$ac_cv_lib_posix_remove" = xyes; then :
56509  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56510fi
56511
56512    fi
56513
56514    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56515    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56516if test "x$ac_cv_func_shmat" = xyes; then :
56517
56518fi
56519
56520    if test $ac_cv_func_shmat = no; then
56521      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56522$as_echo_n "checking for shmat in -lipc... " >&6; }
56523if ${ac_cv_lib_ipc_shmat+:} false; then :
56524  $as_echo_n "(cached) " >&6
56525else
56526  ac_check_lib_save_LIBS=$LIBS
56527LIBS="-lipc  $LIBS"
56528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56529/* end confdefs.h.  */
56530
56531/* Override any GCC internal prototype to avoid an error.
56532   Use char because int might match the return type of a GCC
56533   builtin and then its argument prototype would still apply.  */
56534#ifdef __cplusplus
56535extern "C"
56536#endif
56537char shmat ();
56538int
56539main ()
56540{
56541return shmat ();
56542  ;
56543  return 0;
56544}
56545_ACEOF
56546if ac_fn_cxx_try_link "$LINENO"; then :
56547  ac_cv_lib_ipc_shmat=yes
56548else
56549  ac_cv_lib_ipc_shmat=no
56550fi
56551rm -f core conftest.err conftest.$ac_objext \
56552    conftest$ac_exeext conftest.$ac_ext
56553LIBS=$ac_check_lib_save_LIBS
56554fi
56555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56556$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56557if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56558  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56559fi
56560
56561    fi
56562  fi
56563
56564  # Check for libraries that X11R6 Xt/Xaw programs need.
56565  ac_save_LDFLAGS=$LDFLAGS
56566  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56567  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56568  # check for ICE first), but we must link in the order -lSM -lICE or
56569  # we get undefined symbols.  So assume we have SM if we have ICE.
56570  # These have to be linked with before -lX11, unlike the other
56571  # libraries we check for below, so use a different variable.
56572  # John Interrante, Karl Berry
56573  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56574$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56575if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56576  $as_echo_n "(cached) " >&6
56577else
56578  ac_check_lib_save_LIBS=$LIBS
56579LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56581/* end confdefs.h.  */
56582
56583/* Override any GCC internal prototype to avoid an error.
56584   Use char because int might match the return type of a GCC
56585   builtin and then its argument prototype would still apply.  */
56586#ifdef __cplusplus
56587extern "C"
56588#endif
56589char IceConnectionNumber ();
56590int
56591main ()
56592{
56593return IceConnectionNumber ();
56594  ;
56595  return 0;
56596}
56597_ACEOF
56598if ac_fn_cxx_try_link "$LINENO"; then :
56599  ac_cv_lib_ICE_IceConnectionNumber=yes
56600else
56601  ac_cv_lib_ICE_IceConnectionNumber=no
56602fi
56603rm -f core conftest.err conftest.$ac_objext \
56604    conftest$ac_exeext conftest.$ac_ext
56605LIBS=$ac_check_lib_save_LIBS
56606fi
56607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56608$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56609if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56610  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56611fi
56612
56613  LDFLAGS=$ac_save_LDFLAGS
56614
56615fi
56616
56617
56618    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56619    # this doesn't make sense so we remove it.
56620    if test "x$COMPILE_TYPE" = xcross; then
56621      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56622    fi
56623
56624    if test "x$no_x" = xyes; then
56625
56626  # Print a helpful message on how to acquire the necessary build dependency.
56627  # x11 is the help tag: freetype, cups, alsa etc
56628  MISSING_DEPENDENCY=x11
56629
56630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56631    cygwin_help $MISSING_DEPENDENCY
56632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56633    msys_help $MISSING_DEPENDENCY
56634  else
56635    PKGHANDLER_COMMAND=
56636
56637    case $PKGHANDLER in
56638      apt-get)
56639        apt_help     $MISSING_DEPENDENCY ;;
56640      yum)
56641        yum_help     $MISSING_DEPENDENCY ;;
56642      port)
56643        port_help    $MISSING_DEPENDENCY ;;
56644      pkgutil)
56645        pkgutil_help $MISSING_DEPENDENCY ;;
56646      pkgadd)
56647        pkgadd_help  $MISSING_DEPENDENCY ;;
56648    esac
56649
56650    if test "x$PKGHANDLER_COMMAND" != x; then
56651      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56652    fi
56653  fi
56654
56655      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56656    fi
56657
56658    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56659      OPENWIN_HOME="/usr/openwin"
56660      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56661      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56662          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56663    fi
56664
56665    ac_ext=c
56666ac_cpp='$CPP $CPPFLAGS'
56667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56669ac_compiler_gnu=$ac_cv_c_compiler_gnu
56670
56671    OLD_CFLAGS="$CFLAGS"
56672    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56673
56674    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56675    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56676do :
56677  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56678ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56679          # include <X11/Xlib.h>
56680          # include <X11/Xutil.h>
56681
56682
56683"
56684if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56685  cat >>confdefs.h <<_ACEOF
56686#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56687_ACEOF
56688 X11_HEADERS_OK=yes
56689else
56690  X11_HEADERS_OK=no; break
56691fi
56692
56693done
56694
56695
56696    if test "x$X11_HEADERS_OK" = xno; then
56697
56698  # Print a helpful message on how to acquire the necessary build dependency.
56699  # x11 is the help tag: freetype, cups, alsa etc
56700  MISSING_DEPENDENCY=x11
56701
56702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56703    cygwin_help $MISSING_DEPENDENCY
56704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56705    msys_help $MISSING_DEPENDENCY
56706  else
56707    PKGHANDLER_COMMAND=
56708
56709    case $PKGHANDLER in
56710      apt-get)
56711        apt_help     $MISSING_DEPENDENCY ;;
56712      yum)
56713        yum_help     $MISSING_DEPENDENCY ;;
56714      port)
56715        port_help    $MISSING_DEPENDENCY ;;
56716      pkgutil)
56717        pkgutil_help $MISSING_DEPENDENCY ;;
56718      pkgadd)
56719        pkgadd_help  $MISSING_DEPENDENCY ;;
56720    esac
56721
56722    if test "x$PKGHANDLER_COMMAND" != x; then
56723      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56724    fi
56725  fi
56726
56727      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56728    fi
56729
56730    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56731    # defined in libawt_xawt.
56732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56733$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56734    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56735/* end confdefs.h.  */
56736#include <X11/extensions/Xrender.h>
56737int
56738main ()
56739{
56740XLinearGradient x;
56741  ;
56742  return 0;
56743}
56744_ACEOF
56745if ac_fn_c_try_compile "$LINENO"; then :
56746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56747$as_echo "yes" >&6; }
56748else
56749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56750$as_echo "no" >&6; }
56751         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56752fi
56753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56754
56755    CFLAGS="$OLD_CFLAGS"
56756    ac_ext=cpp
56757ac_cpp='$CXXCPP $CPPFLAGS'
56758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56761
56762  fi # NEEDS_LIB_X11
56763
56764
56765
56766
56767
56768
56769# Check whether --with-cups was given.
56770if test "${with_cups+set}" = set; then :
56771  withval=$with_cups;
56772fi
56773
56774
56775# Check whether --with-cups-include was given.
56776if test "${with_cups_include+set}" = set; then :
56777  withval=$with_cups_include;
56778fi
56779
56780
56781  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56782    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56783        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56784      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56785$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56786    fi
56787    CUPS_CFLAGS=
56788  else
56789    CUPS_FOUND=no
56790
56791    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56792      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56793    fi
56794
56795    if test "x${with_cups}" != x; then
56796      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56797$as_echo_n "checking for cups headers... " >&6; }
56798      if test -s "${with_cups}/include/cups/cups.h"; then
56799        CUPS_CFLAGS="-I${with_cups}/include"
56800        CUPS_FOUND=yes
56801        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56802$as_echo "$CUPS_FOUND" >&6; }
56803      else
56804        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56805      fi
56806    fi
56807    if test "x${with_cups_include}" != x; then
56808      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56809$as_echo_n "checking for cups headers... " >&6; }
56810      if test -s "${with_cups_include}/cups/cups.h"; then
56811        CUPS_CFLAGS="-I${with_cups_include}"
56812        CUPS_FOUND=yes
56813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56814$as_echo "$CUPS_FOUND" >&6; }
56815      else
56816        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56817      fi
56818    fi
56819    if test "x$CUPS_FOUND" = xno; then
56820      # Are the cups headers installed in the default /usr/include location?
56821      for ac_header in cups/cups.h cups/ppd.h
56822do :
56823  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56824ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56825if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56826  cat >>confdefs.h <<_ACEOF
56827#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56828_ACEOF
56829
56830          CUPS_FOUND=yes
56831          CUPS_CFLAGS=
56832          DEFAULT_CUPS=yes
56833
56834fi
56835
56836done
56837
56838    fi
56839    if test "x$CUPS_FOUND" = xno; then
56840
56841  # Print a helpful message on how to acquire the necessary build dependency.
56842  # cups is the help tag: freetype, cups, alsa etc
56843  MISSING_DEPENDENCY=cups
56844
56845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56846    cygwin_help $MISSING_DEPENDENCY
56847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56848    msys_help $MISSING_DEPENDENCY
56849  else
56850    PKGHANDLER_COMMAND=
56851
56852    case $PKGHANDLER in
56853      apt-get)
56854        apt_help     $MISSING_DEPENDENCY ;;
56855      yum)
56856        yum_help     $MISSING_DEPENDENCY ;;
56857      port)
56858        port_help    $MISSING_DEPENDENCY ;;
56859      pkgutil)
56860        pkgutil_help $MISSING_DEPENDENCY ;;
56861      pkgadd)
56862        pkgadd_help  $MISSING_DEPENDENCY ;;
56863    esac
56864
56865    if test "x$PKGHANDLER_COMMAND" != x; then
56866      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56867    fi
56868  fi
56869
56870      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56871    fi
56872  fi
56873
56874
56875
56876
56877
56878# Check whether --with-freetype was given.
56879if test "${with_freetype+set}" = set; then :
56880  withval=$with_freetype;
56881fi
56882
56883
56884# Check whether --with-freetype-include was given.
56885if test "${with_freetype_include+set}" = set; then :
56886  withval=$with_freetype_include;
56887fi
56888
56889
56890# Check whether --with-freetype-lib was given.
56891if test "${with_freetype_lib+set}" = set; then :
56892  withval=$with_freetype_lib;
56893fi
56894
56895
56896# Check whether --with-freetype-src was given.
56897if test "${with_freetype_src+set}" = set; then :
56898  withval=$with_freetype_src;
56899fi
56900
56901  # Check whether --enable-freetype-bundling was given.
56902if test "${enable_freetype_bundling+set}" = set; then :
56903  enableval=$enable_freetype_bundling;
56904fi
56905
56906
56907  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56908  FREETYPE_BASE_NAME=freetype
56909  FREETYPE_CFLAGS=
56910  FREETYPE_LIBS=
56911  FREETYPE_BUNDLE_LIB_PATH=
56912
56913  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56914    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56915        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56916        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56917        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56918      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56919$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56920    fi
56921    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56922      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56923$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56924    fi
56925  else
56926    # freetype is needed to build; go get it!
56927
56928    BUNDLE_FREETYPE="$enable_freetype_bundling"
56929
56930    if  test "x$with_freetype_src" != x; then
56931      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56932        # Try to build freetype if --with-freetype-src was given on Windows
56933
56934  FREETYPE_SRC_PATH="$with_freetype_src"
56935  BUILD_FREETYPE=yes
56936
56937  # Check if the freetype sources are acessible..
56938  if ! test -d $FREETYPE_SRC_PATH; then
56939    { $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
56940$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56941    BUILD_FREETYPE=no
56942  fi
56943  # ..and contain a vc2010 project file
56944  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56945  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56946    { $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
56947$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56948    BUILD_FREETYPE=no
56949  fi
56950  # Now check if configure found a version of 'msbuild.exe'
56951  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56952    { $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
56953$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;}
56954    BUILD_FREETYPE=no
56955  fi
56956
56957  # Ready to go..
56958  if test "x$BUILD_FREETYPE" = xyes; then
56959    # msbuild requires trailing slashes for output directories
56960    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56961    freetype_lib_path_unix="$freetype_lib_path"
56962    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56963
56964  unix_path="$vcxproj_path"
56965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56966    windows_path=`$CYGPATH -m "$unix_path"`
56967    vcxproj_path="$windows_path"
56968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56969    windows_path=`cmd //c echo $unix_path`
56970    vcxproj_path="$windows_path"
56971  fi
56972
56973
56974  unix_path="$freetype_lib_path"
56975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56976    windows_path=`$CYGPATH -m "$unix_path"`
56977    freetype_lib_path="$windows_path"
56978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56979    windows_path=`cmd //c echo $unix_path`
56980    freetype_lib_path="$windows_path"
56981  fi
56982
56983
56984  unix_path="$freetype_obj_path"
56985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56986    windows_path=`$CYGPATH -m "$unix_path"`
56987    freetype_obj_path="$windows_path"
56988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56989    windows_path=`cmd //c echo $unix_path`
56990    freetype_obj_path="$windows_path"
56991  fi
56992
56993    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56994      freetype_platform=x64
56995    else
56996      freetype_platform=win32
56997    fi
56998
56999    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57000    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57001    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57002    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57003    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57004$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57005
57006    # First we try to build the freetype.dll
57007    $ECHO -e "@echo off\n"\
57008        "$MSBUILD $vcxproj_path "\
57009        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57010        "/p:Configuration=\"Release Multithreaded\" "\
57011        "/p:Platform=$freetype_platform "\
57012        "/p:ConfigurationType=DynamicLibrary "\
57013        "/p:TargetName=freetype "\
57014        "/p:OutDir=\"$freetype_lib_path\" "\
57015        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57016    cmd /c freetype.bat
57017
57018    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57019      # If that succeeds we also build freetype.lib
57020      $ECHO -e "@echo off\n"\
57021          "$MSBUILD $vcxproj_path "\
57022          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57023          "/p:Configuration=\"Release Multithreaded\" "\
57024          "/p:Platform=$freetype_platform "\
57025          "/p:ConfigurationType=StaticLibrary "\
57026          "/p:TargetName=freetype "\
57027          "/p:OutDir=\"$freetype_lib_path\" "\
57028          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57029      cmd /c freetype.bat
57030
57031      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57032        # Once we build both, lib and dll, set freetype lib and include path appropriately
57033        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57034        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57035        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57036$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57037      else
57038        BUILD_FREETYPE=no
57039      fi
57040    else
57041      BUILD_FREETYPE=no
57042    fi
57043  fi
57044
57045        if test "x$BUILD_FREETYPE" = xyes; then
57046          # Okay, we built it. Check that it works.
57047
57048  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57049  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57050  METHOD="--with-freetype-src"
57051
57052  # Let's start with an optimistic view of the world :-)
57053  FOUND_FREETYPE=yes
57054
57055  # First look for the canonical freetype main include file ft2build.h.
57056  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57057    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57058    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57059    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57060      # Fail.
57061      FOUND_FREETYPE=no
57062    fi
57063  fi
57064
57065  if test "x$FOUND_FREETYPE" = xyes; then
57066    # Include file found, let's continue the sanity check.
57067    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57068$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57069
57070    # Reset to default value
57071    FREETYPE_BASE_NAME=freetype
57072    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57073    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57074      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57075          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57076        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57077        # for the .6 version explicitly.
57078        FREETYPE_BASE_NAME=freetype.6
57079        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57080        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57081$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57082      else
57083        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57084$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57085        FOUND_FREETYPE=no
57086      fi
57087    else
57088      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57089        # On Windows, we will need both .lib and .dll file.
57090        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57091          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57092$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57093          FOUND_FREETYPE=no
57094        fi
57095      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57096          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57097        # Found lib in isa dir, use that instead.
57098        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57099        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57100$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57101      fi
57102    fi
57103  fi
57104
57105  if test "x$FOUND_FREETYPE" = xyes; then
57106
57107  # Only process if variable expands to non-empty
57108
57109  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57111
57112  # Input might be given as Windows format, start by converting to
57113  # unix format.
57114  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57115  new_path=`$CYGPATH -u "$path"`
57116
57117  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57118  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57119  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57120  # "foo.exe" is OK but "foo" is an error.
57121  #
57122  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57123  # It is also a way to make sure we got the proper file name for the real test later on.
57124  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57125  if test "x$test_shortpath" = x; then
57126    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57127$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57128    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57129  fi
57130
57131  # Call helper function which possibly converts this using DOS-style short mode.
57132  # If so, the updated path is stored in $new_path.
57133
57134  input_path="$new_path"
57135  # Check if we need to convert this using DOS-style short mode. If the path
57136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57137  # take no chances and rewrite it.
57138  # Note: m4 eats our [], so we need to use [ and ] instead.
57139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57140  if test "x$has_forbidden_chars" != x; then
57141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57145      # Going to short mode and back again did indeed matter. Since short mode is
57146      # case insensitive, let's make it lowercase to improve readability.
57147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57148      # Now convert it back to Unix-style (cygpath)
57149      input_path=`$CYGPATH -u "$shortmode_path"`
57150      new_path="$input_path"
57151    fi
57152  fi
57153
57154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57155  if test "x$test_cygdrive_prefix" = x; then
57156    # As a simple fix, exclude /usr/bin since it's not a real path.
57157    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57159      # a path prefixed by /cygdrive for fixpath to work.
57160      new_path="$CYGWIN_ROOT_PATH$input_path"
57161    fi
57162  fi
57163
57164
57165  if test "x$path" != "x$new_path"; then
57166    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57168$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57169  fi
57170
57171    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57172
57173  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57174  has_colon=`$ECHO $path | $GREP ^.:`
57175  new_path="$path"
57176  if test "x$has_colon" = x; then
57177    # Not in mixed or Windows style, start by that.
57178    new_path=`cmd //c echo $path`
57179  fi
57180
57181
57182  input_path="$new_path"
57183  # Check if we need to convert this using DOS-style short mode. If the path
57184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57185  # take no chances and rewrite it.
57186  # Note: m4 eats our [], so we need to use [ and ] instead.
57187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57188  if test "x$has_forbidden_chars" != x; then
57189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57191  fi
57192
57193
57194  windows_path="$new_path"
57195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57196    unix_path=`$CYGPATH -u "$windows_path"`
57197    new_path="$unix_path"
57198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57200    new_path="$unix_path"
57201  fi
57202
57203  if test "x$path" != "x$new_path"; then
57204    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57206$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57207  fi
57208
57209  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57210  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57211
57212    else
57213      # We're on a unix platform. Hooray! :)
57214      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57215      has_space=`$ECHO "$path" | $GREP " "`
57216      if test "x$has_space" != x; then
57217        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57219        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57220      fi
57221
57222      # Use eval to expand a potential ~
57223      eval path="$path"
57224      if test ! -f "$path" && test ! -d "$path"; then
57225        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57226      fi
57227
57228      if test -d "$path"; then
57229        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57230      else
57231        dir="`$DIRNAME "$path"`"
57232        base="`$BASENAME "$path"`"
57233        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57234      fi
57235    fi
57236  fi
57237
57238
57239  # Only process if variable expands to non-empty
57240
57241  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57243
57244  # Input might be given as Windows format, start by converting to
57245  # unix format.
57246  path="$POTENTIAL_FREETYPE_LIB_PATH"
57247  new_path=`$CYGPATH -u "$path"`
57248
57249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57252  # "foo.exe" is OK but "foo" is an error.
57253  #
57254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57255  # It is also a way to make sure we got the proper file name for the real test later on.
57256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57257  if test "x$test_shortpath" = x; then
57258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57260    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57261  fi
57262
57263  # Call helper function which possibly converts this using DOS-style short mode.
57264  # If so, the updated path is stored in $new_path.
57265
57266  input_path="$new_path"
57267  # Check if we need to convert this using DOS-style short mode. If the path
57268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57269  # take no chances and rewrite it.
57270  # Note: m4 eats our [], so we need to use [ and ] instead.
57271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57272  if test "x$has_forbidden_chars" != x; then
57273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57277      # Going to short mode and back again did indeed matter. Since short mode is
57278      # case insensitive, let's make it lowercase to improve readability.
57279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57280      # Now convert it back to Unix-style (cygpath)
57281      input_path=`$CYGPATH -u "$shortmode_path"`
57282      new_path="$input_path"
57283    fi
57284  fi
57285
57286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57287  if test "x$test_cygdrive_prefix" = x; then
57288    # As a simple fix, exclude /usr/bin since it's not a real path.
57289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57291      # a path prefixed by /cygdrive for fixpath to work.
57292      new_path="$CYGWIN_ROOT_PATH$input_path"
57293    fi
57294  fi
57295
57296
57297  if test "x$path" != "x$new_path"; then
57298    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57300$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57301  fi
57302
57303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57304
57305  path="$POTENTIAL_FREETYPE_LIB_PATH"
57306  has_colon=`$ECHO $path | $GREP ^.:`
57307  new_path="$path"
57308  if test "x$has_colon" = x; then
57309    # Not in mixed or Windows style, start by that.
57310    new_path=`cmd //c echo $path`
57311  fi
57312
57313
57314  input_path="$new_path"
57315  # Check if we need to convert this using DOS-style short mode. If the path
57316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57317  # take no chances and rewrite it.
57318  # Note: m4 eats our [], so we need to use [ and ] instead.
57319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57320  if test "x$has_forbidden_chars" != x; then
57321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57323  fi
57324
57325
57326  windows_path="$new_path"
57327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57328    unix_path=`$CYGPATH -u "$windows_path"`
57329    new_path="$unix_path"
57330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57332    new_path="$unix_path"
57333  fi
57334
57335  if test "x$path" != "x$new_path"; then
57336    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57338$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57339  fi
57340
57341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57343
57344    else
57345      # We're on a unix platform. Hooray! :)
57346      path="$POTENTIAL_FREETYPE_LIB_PATH"
57347      has_space=`$ECHO "$path" | $GREP " "`
57348      if test "x$has_space" != x; then
57349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57350$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57352      fi
57353
57354      # Use eval to expand a potential ~
57355      eval path="$path"
57356      if test ! -f "$path" && test ! -d "$path"; then
57357        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57358      fi
57359
57360      if test -d "$path"; then
57361        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57362      else
57363        dir="`$DIRNAME "$path"`"
57364        base="`$BASENAME "$path"`"
57365        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57366      fi
57367    fi
57368  fi
57369
57370
57371    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57372    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57373$as_echo_n "checking for freetype includes... " >&6; }
57374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57375$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57376    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57378$as_echo_n "checking for freetype libraries... " >&6; }
57379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57380$as_echo "$FREETYPE_LIB_PATH" >&6; }
57381  fi
57382
57383          if test "x$FOUND_FREETYPE" != xyes; then
57384            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57385          fi
57386        else
57387          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57388$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57389          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57390        fi
57391      else
57392        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57393$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57394      fi
57395    fi
57396
57397    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57398      # User has specified settings
57399
57400      if test "x$BUNDLE_FREETYPE" = x; then
57401        # If not specified, default is to bundle freetype
57402        BUNDLE_FREETYPE=yes
57403      fi
57404
57405      if test "x$with_freetype" != x; then
57406        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57407        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57408      fi
57409
57410      # Allow --with-freetype-lib and --with-freetype-include to override
57411      if test "x$with_freetype_include" != x; then
57412        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57413      fi
57414      if test "x$with_freetype_lib" != x; then
57415        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57416      fi
57417
57418      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57419        # Okay, we got it. Check that it works.
57420
57421  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57422  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57423  METHOD="--with-freetype"
57424
57425  # Let's start with an optimistic view of the world :-)
57426  FOUND_FREETYPE=yes
57427
57428  # First look for the canonical freetype main include file ft2build.h.
57429  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57430    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57431    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57432    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57433      # Fail.
57434      FOUND_FREETYPE=no
57435    fi
57436  fi
57437
57438  if test "x$FOUND_FREETYPE" = xyes; then
57439    # Include file found, let's continue the sanity check.
57440    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57441$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57442
57443    # Reset to default value
57444    FREETYPE_BASE_NAME=freetype
57445    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57446    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57447      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57448          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57449        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57450        # for the .6 version explicitly.
57451        FREETYPE_BASE_NAME=freetype.6
57452        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57453        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57454$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57455      else
57456        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57457$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57458        FOUND_FREETYPE=no
57459      fi
57460    else
57461      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57462        # On Windows, we will need both .lib and .dll file.
57463        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57464          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57465$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57466          FOUND_FREETYPE=no
57467        fi
57468      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57469          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57470        # Found lib in isa dir, use that instead.
57471        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57472        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57473$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57474      fi
57475    fi
57476  fi
57477
57478  if test "x$FOUND_FREETYPE" = xyes; then
57479
57480  # Only process if variable expands to non-empty
57481
57482  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57483    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57484
57485  # Input might be given as Windows format, start by converting to
57486  # unix format.
57487  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57488  new_path=`$CYGPATH -u "$path"`
57489
57490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57493  # "foo.exe" is OK but "foo" is an error.
57494  #
57495  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57496  # It is also a way to make sure we got the proper file name for the real test later on.
57497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57498  if test "x$test_shortpath" = x; then
57499    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57501    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57502  fi
57503
57504  # Call helper function which possibly converts this using DOS-style short mode.
57505  # If so, the updated path is stored in $new_path.
57506
57507  input_path="$new_path"
57508  # Check if we need to convert this using DOS-style short mode. If the path
57509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57510  # take no chances and rewrite it.
57511  # Note: m4 eats our [], so we need to use [ and ] instead.
57512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57513  if test "x$has_forbidden_chars" != x; then
57514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57515    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57516    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57517    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57518      # Going to short mode and back again did indeed matter. Since short mode is
57519      # case insensitive, let's make it lowercase to improve readability.
57520      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57521      # Now convert it back to Unix-style (cygpath)
57522      input_path=`$CYGPATH -u "$shortmode_path"`
57523      new_path="$input_path"
57524    fi
57525  fi
57526
57527  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57528  if test "x$test_cygdrive_prefix" = x; then
57529    # As a simple fix, exclude /usr/bin since it's not a real path.
57530    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57531      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57532      # a path prefixed by /cygdrive for fixpath to work.
57533      new_path="$CYGWIN_ROOT_PATH$input_path"
57534    fi
57535  fi
57536
57537
57538  if test "x$path" != "x$new_path"; then
57539    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57540    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57541$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57542  fi
57543
57544    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57545
57546  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57547  has_colon=`$ECHO $path | $GREP ^.:`
57548  new_path="$path"
57549  if test "x$has_colon" = x; then
57550    # Not in mixed or Windows style, start by that.
57551    new_path=`cmd //c echo $path`
57552  fi
57553
57554
57555  input_path="$new_path"
57556  # Check if we need to convert this using DOS-style short mode. If the path
57557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57558  # take no chances and rewrite it.
57559  # Note: m4 eats our [], so we need to use [ and ] instead.
57560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57561  if test "x$has_forbidden_chars" != x; then
57562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57564  fi
57565
57566
57567  windows_path="$new_path"
57568  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57569    unix_path=`$CYGPATH -u "$windows_path"`
57570    new_path="$unix_path"
57571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57572    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57573    new_path="$unix_path"
57574  fi
57575
57576  if test "x$path" != "x$new_path"; then
57577    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57580  fi
57581
57582  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57583  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57584
57585    else
57586      # We're on a unix platform. Hooray! :)
57587      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57588      has_space=`$ECHO "$path" | $GREP " "`
57589      if test "x$has_space" != x; then
57590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57591$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57592        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57593      fi
57594
57595      # Use eval to expand a potential ~
57596      eval path="$path"
57597      if test ! -f "$path" && test ! -d "$path"; then
57598        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57599      fi
57600
57601      if test -d "$path"; then
57602        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57603      else
57604        dir="`$DIRNAME "$path"`"
57605        base="`$BASENAME "$path"`"
57606        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57607      fi
57608    fi
57609  fi
57610
57611
57612  # Only process if variable expands to non-empty
57613
57614  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57616
57617  # Input might be given as Windows format, start by converting to
57618  # unix format.
57619  path="$POTENTIAL_FREETYPE_LIB_PATH"
57620  new_path=`$CYGPATH -u "$path"`
57621
57622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57625  # "foo.exe" is OK but "foo" is an error.
57626  #
57627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57628  # It is also a way to make sure we got the proper file name for the real test later on.
57629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57630  if test "x$test_shortpath" = x; then
57631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57633    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57634  fi
57635
57636  # Call helper function which possibly converts this using DOS-style short mode.
57637  # If so, the updated path is stored in $new_path.
57638
57639  input_path="$new_path"
57640  # Check if we need to convert this using DOS-style short mode. If the path
57641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57642  # take no chances and rewrite it.
57643  # Note: m4 eats our [], so we need to use [ and ] instead.
57644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57645  if test "x$has_forbidden_chars" != x; then
57646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57650      # Going to short mode and back again did indeed matter. Since short mode is
57651      # case insensitive, let's make it lowercase to improve readability.
57652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57653      # Now convert it back to Unix-style (cygpath)
57654      input_path=`$CYGPATH -u "$shortmode_path"`
57655      new_path="$input_path"
57656    fi
57657  fi
57658
57659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57660  if test "x$test_cygdrive_prefix" = x; then
57661    # As a simple fix, exclude /usr/bin since it's not a real path.
57662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57664      # a path prefixed by /cygdrive for fixpath to work.
57665      new_path="$CYGWIN_ROOT_PATH$input_path"
57666    fi
57667  fi
57668
57669
57670  if test "x$path" != "x$new_path"; then
57671    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57673$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57674  fi
57675
57676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57677
57678  path="$POTENTIAL_FREETYPE_LIB_PATH"
57679  has_colon=`$ECHO $path | $GREP ^.:`
57680  new_path="$path"
57681  if test "x$has_colon" = x; then
57682    # Not in mixed or Windows style, start by that.
57683    new_path=`cmd //c echo $path`
57684  fi
57685
57686
57687  input_path="$new_path"
57688  # Check if we need to convert this using DOS-style short mode. If the path
57689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57690  # take no chances and rewrite it.
57691  # Note: m4 eats our [], so we need to use [ and ] instead.
57692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57693  if test "x$has_forbidden_chars" != x; then
57694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57696  fi
57697
57698
57699  windows_path="$new_path"
57700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57701    unix_path=`$CYGPATH -u "$windows_path"`
57702    new_path="$unix_path"
57703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57705    new_path="$unix_path"
57706  fi
57707
57708  if test "x$path" != "x$new_path"; then
57709    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57712  fi
57713
57714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57716
57717    else
57718      # We're on a unix platform. Hooray! :)
57719      path="$POTENTIAL_FREETYPE_LIB_PATH"
57720      has_space=`$ECHO "$path" | $GREP " "`
57721      if test "x$has_space" != x; then
57722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57723$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57725      fi
57726
57727      # Use eval to expand a potential ~
57728      eval path="$path"
57729      if test ! -f "$path" && test ! -d "$path"; then
57730        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57731      fi
57732
57733      if test -d "$path"; then
57734        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57735      else
57736        dir="`$DIRNAME "$path"`"
57737        base="`$BASENAME "$path"`"
57738        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57739      fi
57740    fi
57741  fi
57742
57743
57744    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57746$as_echo_n "checking for freetype includes... " >&6; }
57747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57748$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57749    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57751$as_echo_n "checking for freetype libraries... " >&6; }
57752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57753$as_echo "$FREETYPE_LIB_PATH" >&6; }
57754  fi
57755
57756        if test "x$FOUND_FREETYPE" != xyes; then
57757          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57758        fi
57759      else
57760        # User specified only one of lib or include. This is an error.
57761        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57762          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57763$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57764          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57765        else
57766          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57767$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57768          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57769        fi
57770      fi
57771    else
57772      # User did not specify settings, but we need freetype. Try to locate it.
57773
57774      if test "x$BUNDLE_FREETYPE" = x; then
57775        # If not specified, default is to bundle freetype only on windows
57776        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57777          BUNDLE_FREETYPE=yes
57778        else
57779          BUNDLE_FREETYPE=no
57780        fi
57781      fi
57782
57783      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57784      if test "x$SYSROOT" = x; then
57785        if test "x$FOUND_FREETYPE" != xyes; then
57786          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57787          if test "x$PKG_CONFIG" != x; then
57788
57789pkg_failed=no
57790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57791$as_echo_n "checking for FREETYPE... " >&6; }
57792
57793if test -n "$FREETYPE_CFLAGS"; then
57794    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57795 elif test -n "$PKG_CONFIG"; then
57796    if test -n "$PKG_CONFIG" && \
57797    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57798  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57799  ac_status=$?
57800  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57801  test $ac_status = 0; }; then
57802  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57803else
57804  pkg_failed=yes
57805fi
57806 else
57807    pkg_failed=untried
57808fi
57809if test -n "$FREETYPE_LIBS"; then
57810    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57811 elif test -n "$PKG_CONFIG"; then
57812    if test -n "$PKG_CONFIG" && \
57813    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57814  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57815  ac_status=$?
57816  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57817  test $ac_status = 0; }; then
57818  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57819else
57820  pkg_failed=yes
57821fi
57822 else
57823    pkg_failed=untried
57824fi
57825
57826
57827
57828if test $pkg_failed = yes; then
57829
57830if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57831        _pkg_short_errors_supported=yes
57832else
57833        _pkg_short_errors_supported=no
57834fi
57835        if test $_pkg_short_errors_supported = yes; then
57836	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57837        else
57838	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57839        fi
57840	# Put the nasty error message in config.log where it belongs
57841	echo "$FREETYPE_PKG_ERRORS" >&5
57842
57843	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57844$as_echo "no" >&6; }
57845                FOUND_FREETYPE=no
57846elif test $pkg_failed = untried; then
57847	FOUND_FREETYPE=no
57848else
57849	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57850	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57852$as_echo "yes" >&6; }
57853	FOUND_FREETYPE=yes
57854fi
57855            if test "x$FOUND_FREETYPE" = xyes; then
57856              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57857              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57858              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57859              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57860                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57861              fi
57862              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57863              if test "x$BUNDLE_FREETYPE" = xyes; then
57864                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57865$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57866                FOUND_FREETYPE=no
57867              else
57868                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57869$as_echo_n "checking for freetype... " >&6; }
57870                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57871$as_echo "yes (using pkg-config)" >&6; }
57872              fi
57873            fi
57874          fi
57875        fi
57876      fi
57877
57878      if test "x$FOUND_FREETYPE" != xyes; then
57879        # Check in well-known locations
57880        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57881          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57882
57883  windows_path="$FREETYPE_BASE_DIR"
57884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57885    unix_path=`$CYGPATH -u "$windows_path"`
57886    FREETYPE_BASE_DIR="$unix_path"
57887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57889    FREETYPE_BASE_DIR="$unix_path"
57890  fi
57891
57892
57893  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57894  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57895  METHOD="well-known location"
57896
57897  # Let's start with an optimistic view of the world :-)
57898  FOUND_FREETYPE=yes
57899
57900  # First look for the canonical freetype main include file ft2build.h.
57901  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57902    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57903    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57904    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57905      # Fail.
57906      FOUND_FREETYPE=no
57907    fi
57908  fi
57909
57910  if test "x$FOUND_FREETYPE" = xyes; then
57911    # Include file found, let's continue the sanity check.
57912    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57913$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57914
57915    # Reset to default value
57916    FREETYPE_BASE_NAME=freetype
57917    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57918    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57919      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57920          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57921        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57922        # for the .6 version explicitly.
57923        FREETYPE_BASE_NAME=freetype.6
57924        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57925        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57926$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57927      else
57928        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57929$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57930        FOUND_FREETYPE=no
57931      fi
57932    else
57933      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57934        # On Windows, we will need both .lib and .dll file.
57935        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57936          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57937$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57938          FOUND_FREETYPE=no
57939        fi
57940      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57941          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57942        # Found lib in isa dir, use that instead.
57943        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57944        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57945$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57946      fi
57947    fi
57948  fi
57949
57950  if test "x$FOUND_FREETYPE" = xyes; then
57951
57952  # Only process if variable expands to non-empty
57953
57954  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57956
57957  # Input might be given as Windows format, start by converting to
57958  # unix format.
57959  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57960  new_path=`$CYGPATH -u "$path"`
57961
57962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57965  # "foo.exe" is OK but "foo" is an error.
57966  #
57967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57968  # It is also a way to make sure we got the proper file name for the real test later on.
57969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57970  if test "x$test_shortpath" = x; then
57971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57972$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57973    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57974  fi
57975
57976  # Call helper function which possibly converts this using DOS-style short mode.
57977  # If so, the updated path is stored in $new_path.
57978
57979  input_path="$new_path"
57980  # Check if we need to convert this using DOS-style short mode. If the path
57981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57982  # take no chances and rewrite it.
57983  # Note: m4 eats our [], so we need to use [ and ] instead.
57984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57985  if test "x$has_forbidden_chars" != x; then
57986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57990      # Going to short mode and back again did indeed matter. Since short mode is
57991      # case insensitive, let's make it lowercase to improve readability.
57992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57993      # Now convert it back to Unix-style (cygpath)
57994      input_path=`$CYGPATH -u "$shortmode_path"`
57995      new_path="$input_path"
57996    fi
57997  fi
57998
57999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58000  if test "x$test_cygdrive_prefix" = x; then
58001    # As a simple fix, exclude /usr/bin since it's not a real path.
58002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58004      # a path prefixed by /cygdrive for fixpath to work.
58005      new_path="$CYGWIN_ROOT_PATH$input_path"
58006    fi
58007  fi
58008
58009
58010  if test "x$path" != "x$new_path"; then
58011    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58013$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58014  fi
58015
58016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58017
58018  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58019  has_colon=`$ECHO $path | $GREP ^.:`
58020  new_path="$path"
58021  if test "x$has_colon" = x; then
58022    # Not in mixed or Windows style, start by that.
58023    new_path=`cmd //c echo $path`
58024  fi
58025
58026
58027  input_path="$new_path"
58028  # Check if we need to convert this using DOS-style short mode. If the path
58029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58030  # take no chances and rewrite it.
58031  # Note: m4 eats our [], so we need to use [ and ] instead.
58032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58033  if test "x$has_forbidden_chars" != x; then
58034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58036  fi
58037
58038
58039  windows_path="$new_path"
58040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58041    unix_path=`$CYGPATH -u "$windows_path"`
58042    new_path="$unix_path"
58043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58045    new_path="$unix_path"
58046  fi
58047
58048  if test "x$path" != "x$new_path"; then
58049    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58052  fi
58053
58054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58056
58057    else
58058      # We're on a unix platform. Hooray! :)
58059      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58060      has_space=`$ECHO "$path" | $GREP " "`
58061      if test "x$has_space" != x; then
58062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58063$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58064        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58065      fi
58066
58067      # Use eval to expand a potential ~
58068      eval path="$path"
58069      if test ! -f "$path" && test ! -d "$path"; then
58070        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58071      fi
58072
58073      if test -d "$path"; then
58074        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58075      else
58076        dir="`$DIRNAME "$path"`"
58077        base="`$BASENAME "$path"`"
58078        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58079      fi
58080    fi
58081  fi
58082
58083
58084  # Only process if variable expands to non-empty
58085
58086  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58088
58089  # Input might be given as Windows format, start by converting to
58090  # unix format.
58091  path="$POTENTIAL_FREETYPE_LIB_PATH"
58092  new_path=`$CYGPATH -u "$path"`
58093
58094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58097  # "foo.exe" is OK but "foo" is an error.
58098  #
58099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58100  # It is also a way to make sure we got the proper file name for the real test later on.
58101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58102  if test "x$test_shortpath" = x; then
58103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58105    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58106  fi
58107
58108  # Call helper function which possibly converts this using DOS-style short mode.
58109  # If so, the updated path is stored in $new_path.
58110
58111  input_path="$new_path"
58112  # Check if we need to convert this using DOS-style short mode. If the path
58113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58114  # take no chances and rewrite it.
58115  # Note: m4 eats our [], so we need to use [ and ] instead.
58116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58117  if test "x$has_forbidden_chars" != x; then
58118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58122      # Going to short mode and back again did indeed matter. Since short mode is
58123      # case insensitive, let's make it lowercase to improve readability.
58124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58125      # Now convert it back to Unix-style (cygpath)
58126      input_path=`$CYGPATH -u "$shortmode_path"`
58127      new_path="$input_path"
58128    fi
58129  fi
58130
58131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58132  if test "x$test_cygdrive_prefix" = x; then
58133    # As a simple fix, exclude /usr/bin since it's not a real path.
58134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58136      # a path prefixed by /cygdrive for fixpath to work.
58137      new_path="$CYGWIN_ROOT_PATH$input_path"
58138    fi
58139  fi
58140
58141
58142  if test "x$path" != "x$new_path"; then
58143    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58145$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58146  fi
58147
58148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58149
58150  path="$POTENTIAL_FREETYPE_LIB_PATH"
58151  has_colon=`$ECHO $path | $GREP ^.:`
58152  new_path="$path"
58153  if test "x$has_colon" = x; then
58154    # Not in mixed or Windows style, start by that.
58155    new_path=`cmd //c echo $path`
58156  fi
58157
58158
58159  input_path="$new_path"
58160  # Check if we need to convert this using DOS-style short mode. If the path
58161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58162  # take no chances and rewrite it.
58163  # Note: m4 eats our [], so we need to use [ and ] instead.
58164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58165  if test "x$has_forbidden_chars" != x; then
58166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58168  fi
58169
58170
58171  windows_path="$new_path"
58172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58173    unix_path=`$CYGPATH -u "$windows_path"`
58174    new_path="$unix_path"
58175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58177    new_path="$unix_path"
58178  fi
58179
58180  if test "x$path" != "x$new_path"; then
58181    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58183$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58184  fi
58185
58186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58188
58189    else
58190      # We're on a unix platform. Hooray! :)
58191      path="$POTENTIAL_FREETYPE_LIB_PATH"
58192      has_space=`$ECHO "$path" | $GREP " "`
58193      if test "x$has_space" != x; then
58194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58195$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58197      fi
58198
58199      # Use eval to expand a potential ~
58200      eval path="$path"
58201      if test ! -f "$path" && test ! -d "$path"; then
58202        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58203      fi
58204
58205      if test -d "$path"; then
58206        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58207      else
58208        dir="`$DIRNAME "$path"`"
58209        base="`$BASENAME "$path"`"
58210        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58211      fi
58212    fi
58213  fi
58214
58215
58216    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58218$as_echo_n "checking for freetype includes... " >&6; }
58219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58220$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58221    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58223$as_echo_n "checking for freetype libraries... " >&6; }
58224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58225$as_echo "$FREETYPE_LIB_PATH" >&6; }
58226  fi
58227
58228          if test "x$FOUND_FREETYPE" != xyes; then
58229            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58230
58231  windows_path="$FREETYPE_BASE_DIR"
58232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58233    unix_path=`$CYGPATH -u "$windows_path"`
58234    FREETYPE_BASE_DIR="$unix_path"
58235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58237    FREETYPE_BASE_DIR="$unix_path"
58238  fi
58239
58240
58241  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58242  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58243  METHOD="well-known location"
58244
58245  # Let's start with an optimistic view of the world :-)
58246  FOUND_FREETYPE=yes
58247
58248  # First look for the canonical freetype main include file ft2build.h.
58249  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58250    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58251    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58252    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58253      # Fail.
58254      FOUND_FREETYPE=no
58255    fi
58256  fi
58257
58258  if test "x$FOUND_FREETYPE" = xyes; then
58259    # Include file found, let's continue the sanity check.
58260    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58261$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58262
58263    # Reset to default value
58264    FREETYPE_BASE_NAME=freetype
58265    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58266    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58267      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58268          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58269        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58270        # for the .6 version explicitly.
58271        FREETYPE_BASE_NAME=freetype.6
58272        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58273        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58274$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58275      else
58276        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58277$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58278        FOUND_FREETYPE=no
58279      fi
58280    else
58281      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58282        # On Windows, we will need both .lib and .dll file.
58283        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58284          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58285$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58286          FOUND_FREETYPE=no
58287        fi
58288      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58289          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58290        # Found lib in isa dir, use that instead.
58291        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58292        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58293$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58294      fi
58295    fi
58296  fi
58297
58298  if test "x$FOUND_FREETYPE" = xyes; then
58299
58300  # Only process if variable expands to non-empty
58301
58302  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58304
58305  # Input might be given as Windows format, start by converting to
58306  # unix format.
58307  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58308  new_path=`$CYGPATH -u "$path"`
58309
58310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58313  # "foo.exe" is OK but "foo" is an error.
58314  #
58315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58316  # It is also a way to make sure we got the proper file name for the real test later on.
58317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58318  if test "x$test_shortpath" = x; then
58319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58321    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58322  fi
58323
58324  # Call helper function which possibly converts this using DOS-style short mode.
58325  # If so, the updated path is stored in $new_path.
58326
58327  input_path="$new_path"
58328  # Check if we need to convert this using DOS-style short mode. If the path
58329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58330  # take no chances and rewrite it.
58331  # Note: m4 eats our [], so we need to use [ and ] instead.
58332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58333  if test "x$has_forbidden_chars" != x; then
58334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58338      # Going to short mode and back again did indeed matter. Since short mode is
58339      # case insensitive, let's make it lowercase to improve readability.
58340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58341      # Now convert it back to Unix-style (cygpath)
58342      input_path=`$CYGPATH -u "$shortmode_path"`
58343      new_path="$input_path"
58344    fi
58345  fi
58346
58347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58348  if test "x$test_cygdrive_prefix" = x; then
58349    # As a simple fix, exclude /usr/bin since it's not a real path.
58350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58352      # a path prefixed by /cygdrive for fixpath to work.
58353      new_path="$CYGWIN_ROOT_PATH$input_path"
58354    fi
58355  fi
58356
58357
58358  if test "x$path" != "x$new_path"; then
58359    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58362  fi
58363
58364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58365
58366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58367  has_colon=`$ECHO $path | $GREP ^.:`
58368  new_path="$path"
58369  if test "x$has_colon" = x; then
58370    # Not in mixed or Windows style, start by that.
58371    new_path=`cmd //c echo $path`
58372  fi
58373
58374
58375  input_path="$new_path"
58376  # Check if we need to convert this using DOS-style short mode. If the path
58377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58378  # take no chances and rewrite it.
58379  # Note: m4 eats our [], so we need to use [ and ] instead.
58380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58381  if test "x$has_forbidden_chars" != x; then
58382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58384  fi
58385
58386
58387  windows_path="$new_path"
58388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58389    unix_path=`$CYGPATH -u "$windows_path"`
58390    new_path="$unix_path"
58391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58393    new_path="$unix_path"
58394  fi
58395
58396  if test "x$path" != "x$new_path"; then
58397    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58400  fi
58401
58402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58404
58405    else
58406      # We're on a unix platform. Hooray! :)
58407      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58408      has_space=`$ECHO "$path" | $GREP " "`
58409      if test "x$has_space" != x; then
58410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58413      fi
58414
58415      # Use eval to expand a potential ~
58416      eval path="$path"
58417      if test ! -f "$path" && test ! -d "$path"; then
58418        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58419      fi
58420
58421      if test -d "$path"; then
58422        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58423      else
58424        dir="`$DIRNAME "$path"`"
58425        base="`$BASENAME "$path"`"
58426        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58427      fi
58428    fi
58429  fi
58430
58431
58432  # Only process if variable expands to non-empty
58433
58434  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58436
58437  # Input might be given as Windows format, start by converting to
58438  # unix format.
58439  path="$POTENTIAL_FREETYPE_LIB_PATH"
58440  new_path=`$CYGPATH -u "$path"`
58441
58442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58445  # "foo.exe" is OK but "foo" is an error.
58446  #
58447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58448  # It is also a way to make sure we got the proper file name for the real test later on.
58449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58450  if test "x$test_shortpath" = x; then
58451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58452$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58453    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58454  fi
58455
58456  # Call helper function which possibly converts this using DOS-style short mode.
58457  # If so, the updated path is stored in $new_path.
58458
58459  input_path="$new_path"
58460  # Check if we need to convert this using DOS-style short mode. If the path
58461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58462  # take no chances and rewrite it.
58463  # Note: m4 eats our [], so we need to use [ and ] instead.
58464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58465  if test "x$has_forbidden_chars" != x; then
58466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58470      # Going to short mode and back again did indeed matter. Since short mode is
58471      # case insensitive, let's make it lowercase to improve readability.
58472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58473      # Now convert it back to Unix-style (cygpath)
58474      input_path=`$CYGPATH -u "$shortmode_path"`
58475      new_path="$input_path"
58476    fi
58477  fi
58478
58479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58480  if test "x$test_cygdrive_prefix" = x; then
58481    # As a simple fix, exclude /usr/bin since it's not a real path.
58482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58484      # a path prefixed by /cygdrive for fixpath to work.
58485      new_path="$CYGWIN_ROOT_PATH$input_path"
58486    fi
58487  fi
58488
58489
58490  if test "x$path" != "x$new_path"; then
58491    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58493$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58494  fi
58495
58496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58497
58498  path="$POTENTIAL_FREETYPE_LIB_PATH"
58499  has_colon=`$ECHO $path | $GREP ^.:`
58500  new_path="$path"
58501  if test "x$has_colon" = x; then
58502    # Not in mixed or Windows style, start by that.
58503    new_path=`cmd //c echo $path`
58504  fi
58505
58506
58507  input_path="$new_path"
58508  # Check if we need to convert this using DOS-style short mode. If the path
58509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58510  # take no chances and rewrite it.
58511  # Note: m4 eats our [], so we need to use [ and ] instead.
58512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58513  if test "x$has_forbidden_chars" != x; then
58514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58516  fi
58517
58518
58519  windows_path="$new_path"
58520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58521    unix_path=`$CYGPATH -u "$windows_path"`
58522    new_path="$unix_path"
58523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58525    new_path="$unix_path"
58526  fi
58527
58528  if test "x$path" != "x$new_path"; then
58529    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58531$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58532  fi
58533
58534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58536
58537    else
58538      # We're on a unix platform. Hooray! :)
58539      path="$POTENTIAL_FREETYPE_LIB_PATH"
58540      has_space=`$ECHO "$path" | $GREP " "`
58541      if test "x$has_space" != x; then
58542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58545      fi
58546
58547      # Use eval to expand a potential ~
58548      eval path="$path"
58549      if test ! -f "$path" && test ! -d "$path"; then
58550        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58551      fi
58552
58553      if test -d "$path"; then
58554        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58555      else
58556        dir="`$DIRNAME "$path"`"
58557        base="`$BASENAME "$path"`"
58558        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58559      fi
58560    fi
58561  fi
58562
58563
58564    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58566$as_echo_n "checking for freetype includes... " >&6; }
58567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58568$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58569    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58571$as_echo_n "checking for freetype libraries... " >&6; }
58572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58573$as_echo "$FREETYPE_LIB_PATH" >&6; }
58574  fi
58575
58576          fi
58577          if test "x$FOUND_FREETYPE" != xyes; then
58578            FREETYPE_BASE_DIR="$HOME/freetype"
58579
58580  windows_path="$FREETYPE_BASE_DIR"
58581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58582    unix_path=`$CYGPATH -u "$windows_path"`
58583    FREETYPE_BASE_DIR="$unix_path"
58584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58585    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58586    FREETYPE_BASE_DIR="$unix_path"
58587  fi
58588
58589            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58590
58591  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58592  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58593  METHOD="well-known location"
58594
58595  # Let's start with an optimistic view of the world :-)
58596  FOUND_FREETYPE=yes
58597
58598  # First look for the canonical freetype main include file ft2build.h.
58599  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58600    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58601    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58602    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58603      # Fail.
58604      FOUND_FREETYPE=no
58605    fi
58606  fi
58607
58608  if test "x$FOUND_FREETYPE" = xyes; then
58609    # Include file found, let's continue the sanity check.
58610    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58611$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58612
58613    # Reset to default value
58614    FREETYPE_BASE_NAME=freetype
58615    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58616    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58617      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58618          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58619        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58620        # for the .6 version explicitly.
58621        FREETYPE_BASE_NAME=freetype.6
58622        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58623        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58624$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58625      else
58626        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58627$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58628        FOUND_FREETYPE=no
58629      fi
58630    else
58631      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58632        # On Windows, we will need both .lib and .dll file.
58633        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58634          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58635$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58636          FOUND_FREETYPE=no
58637        fi
58638      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58639          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58640        # Found lib in isa dir, use that instead.
58641        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58642        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58643$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58644      fi
58645    fi
58646  fi
58647
58648  if test "x$FOUND_FREETYPE" = xyes; then
58649
58650  # Only process if variable expands to non-empty
58651
58652  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58654
58655  # Input might be given as Windows format, start by converting to
58656  # unix format.
58657  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58658  new_path=`$CYGPATH -u "$path"`
58659
58660  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58661  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58662  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58663  # "foo.exe" is OK but "foo" is an error.
58664  #
58665  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58666  # It is also a way to make sure we got the proper file name for the real test later on.
58667  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58668  if test "x$test_shortpath" = x; then
58669    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58671    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58672  fi
58673
58674  # Call helper function which possibly converts this using DOS-style short mode.
58675  # If so, the updated path is stored in $new_path.
58676
58677  input_path="$new_path"
58678  # Check if we need to convert this using DOS-style short mode. If the path
58679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58680  # take no chances and rewrite it.
58681  # Note: m4 eats our [], so we need to use [ and ] instead.
58682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58683  if test "x$has_forbidden_chars" != x; then
58684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58688      # Going to short mode and back again did indeed matter. Since short mode is
58689      # case insensitive, let's make it lowercase to improve readability.
58690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58691      # Now convert it back to Unix-style (cygpath)
58692      input_path=`$CYGPATH -u "$shortmode_path"`
58693      new_path="$input_path"
58694    fi
58695  fi
58696
58697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58698  if test "x$test_cygdrive_prefix" = x; then
58699    # As a simple fix, exclude /usr/bin since it's not a real path.
58700    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58702      # a path prefixed by /cygdrive for fixpath to work.
58703      new_path="$CYGWIN_ROOT_PATH$input_path"
58704    fi
58705  fi
58706
58707
58708  if test "x$path" != "x$new_path"; then
58709    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58711$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58712  fi
58713
58714    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58715
58716  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58717  has_colon=`$ECHO $path | $GREP ^.:`
58718  new_path="$path"
58719  if test "x$has_colon" = x; then
58720    # Not in mixed or Windows style, start by that.
58721    new_path=`cmd //c echo $path`
58722  fi
58723
58724
58725  input_path="$new_path"
58726  # Check if we need to convert this using DOS-style short mode. If the path
58727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58728  # take no chances and rewrite it.
58729  # Note: m4 eats our [], so we need to use [ and ] instead.
58730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58731  if test "x$has_forbidden_chars" != x; then
58732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58734  fi
58735
58736
58737  windows_path="$new_path"
58738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58739    unix_path=`$CYGPATH -u "$windows_path"`
58740    new_path="$unix_path"
58741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58743    new_path="$unix_path"
58744  fi
58745
58746  if test "x$path" != "x$new_path"; then
58747    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58750  fi
58751
58752  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58753  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58754
58755    else
58756      # We're on a unix platform. Hooray! :)
58757      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58758      has_space=`$ECHO "$path" | $GREP " "`
58759      if test "x$has_space" != x; then
58760        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58761$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58762        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58763      fi
58764
58765      # Use eval to expand a potential ~
58766      eval path="$path"
58767      if test ! -f "$path" && test ! -d "$path"; then
58768        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58769      fi
58770
58771      if test -d "$path"; then
58772        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58773      else
58774        dir="`$DIRNAME "$path"`"
58775        base="`$BASENAME "$path"`"
58776        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58777      fi
58778    fi
58779  fi
58780
58781
58782  # Only process if variable expands to non-empty
58783
58784  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58786
58787  # Input might be given as Windows format, start by converting to
58788  # unix format.
58789  path="$POTENTIAL_FREETYPE_LIB_PATH"
58790  new_path=`$CYGPATH -u "$path"`
58791
58792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58795  # "foo.exe" is OK but "foo" is an error.
58796  #
58797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58798  # It is also a way to make sure we got the proper file name for the real test later on.
58799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58800  if test "x$test_shortpath" = x; then
58801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58802$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58803    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58804  fi
58805
58806  # Call helper function which possibly converts this using DOS-style short mode.
58807  # If so, the updated path is stored in $new_path.
58808
58809  input_path="$new_path"
58810  # Check if we need to convert this using DOS-style short mode. If the path
58811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58812  # take no chances and rewrite it.
58813  # Note: m4 eats our [], so we need to use [ and ] instead.
58814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58815  if test "x$has_forbidden_chars" != x; then
58816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58820      # Going to short mode and back again did indeed matter. Since short mode is
58821      # case insensitive, let's make it lowercase to improve readability.
58822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58823      # Now convert it back to Unix-style (cygpath)
58824      input_path=`$CYGPATH -u "$shortmode_path"`
58825      new_path="$input_path"
58826    fi
58827  fi
58828
58829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58830  if test "x$test_cygdrive_prefix" = x; then
58831    # As a simple fix, exclude /usr/bin since it's not a real path.
58832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58834      # a path prefixed by /cygdrive for fixpath to work.
58835      new_path="$CYGWIN_ROOT_PATH$input_path"
58836    fi
58837  fi
58838
58839
58840  if test "x$path" != "x$new_path"; then
58841    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58843$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58844  fi
58845
58846    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58847
58848  path="$POTENTIAL_FREETYPE_LIB_PATH"
58849  has_colon=`$ECHO $path | $GREP ^.:`
58850  new_path="$path"
58851  if test "x$has_colon" = x; then
58852    # Not in mixed or Windows style, start by that.
58853    new_path=`cmd //c echo $path`
58854  fi
58855
58856
58857  input_path="$new_path"
58858  # Check if we need to convert this using DOS-style short mode. If the path
58859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58860  # take no chances and rewrite it.
58861  # Note: m4 eats our [], so we need to use [ and ] instead.
58862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58863  if test "x$has_forbidden_chars" != x; then
58864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58866  fi
58867
58868
58869  windows_path="$new_path"
58870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58871    unix_path=`$CYGPATH -u "$windows_path"`
58872    new_path="$unix_path"
58873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58875    new_path="$unix_path"
58876  fi
58877
58878  if test "x$path" != "x$new_path"; then
58879    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58881$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58882  fi
58883
58884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58886
58887    else
58888      # We're on a unix platform. Hooray! :)
58889      path="$POTENTIAL_FREETYPE_LIB_PATH"
58890      has_space=`$ECHO "$path" | $GREP " "`
58891      if test "x$has_space" != x; then
58892        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58893$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58894        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58895      fi
58896
58897      # Use eval to expand a potential ~
58898      eval path="$path"
58899      if test ! -f "$path" && test ! -d "$path"; then
58900        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58901      fi
58902
58903      if test -d "$path"; then
58904        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58905      else
58906        dir="`$DIRNAME "$path"`"
58907        base="`$BASENAME "$path"`"
58908        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58909      fi
58910    fi
58911  fi
58912
58913
58914    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58916$as_echo_n "checking for freetype includes... " >&6; }
58917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58918$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58919    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58920    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58921$as_echo_n "checking for freetype libraries... " >&6; }
58922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58923$as_echo "$FREETYPE_LIB_PATH" >&6; }
58924  fi
58925
58926            else
58927
58928  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58929  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58930  METHOD="well-known location"
58931
58932  # Let's start with an optimistic view of the world :-)
58933  FOUND_FREETYPE=yes
58934
58935  # First look for the canonical freetype main include file ft2build.h.
58936  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58937    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58938    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58939    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58940      # Fail.
58941      FOUND_FREETYPE=no
58942    fi
58943  fi
58944
58945  if test "x$FOUND_FREETYPE" = xyes; then
58946    # Include file found, let's continue the sanity check.
58947    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58948$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58949
58950    # Reset to default value
58951    FREETYPE_BASE_NAME=freetype
58952    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58953    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58954      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58955          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58956        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58957        # for the .6 version explicitly.
58958        FREETYPE_BASE_NAME=freetype.6
58959        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58960        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58961$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58962      else
58963        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58964$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58965        FOUND_FREETYPE=no
58966      fi
58967    else
58968      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58969        # On Windows, we will need both .lib and .dll file.
58970        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58971          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58972$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58973          FOUND_FREETYPE=no
58974        fi
58975      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58976          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58977        # Found lib in isa dir, use that instead.
58978        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58979        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58980$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58981      fi
58982    fi
58983  fi
58984
58985  if test "x$FOUND_FREETYPE" = xyes; then
58986
58987  # Only process if variable expands to non-empty
58988
58989  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58990    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58991
58992  # Input might be given as Windows format, start by converting to
58993  # unix format.
58994  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58995  new_path=`$CYGPATH -u "$path"`
58996
58997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59000  # "foo.exe" is OK but "foo" is an error.
59001  #
59002  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59003  # It is also a way to make sure we got the proper file name for the real test later on.
59004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59005  if test "x$test_shortpath" = x; then
59006    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59007$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59008    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59009  fi
59010
59011  # Call helper function which possibly converts this using DOS-style short mode.
59012  # If so, the updated path is stored in $new_path.
59013
59014  input_path="$new_path"
59015  # Check if we need to convert this using DOS-style short mode. If the path
59016  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59017  # take no chances and rewrite it.
59018  # Note: m4 eats our [], so we need to use [ and ] instead.
59019  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59020  if test "x$has_forbidden_chars" != x; then
59021    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59022    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59023    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59024    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59025      # Going to short mode and back again did indeed matter. Since short mode is
59026      # case insensitive, let's make it lowercase to improve readability.
59027      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59028      # Now convert it back to Unix-style (cygpath)
59029      input_path=`$CYGPATH -u "$shortmode_path"`
59030      new_path="$input_path"
59031    fi
59032  fi
59033
59034  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59035  if test "x$test_cygdrive_prefix" = x; then
59036    # As a simple fix, exclude /usr/bin since it's not a real path.
59037    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59038      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59039      # a path prefixed by /cygdrive for fixpath to work.
59040      new_path="$CYGWIN_ROOT_PATH$input_path"
59041    fi
59042  fi
59043
59044
59045  if test "x$path" != "x$new_path"; then
59046    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59048$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59049  fi
59050
59051    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59052
59053  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59054  has_colon=`$ECHO $path | $GREP ^.:`
59055  new_path="$path"
59056  if test "x$has_colon" = x; then
59057    # Not in mixed or Windows style, start by that.
59058    new_path=`cmd //c echo $path`
59059  fi
59060
59061
59062  input_path="$new_path"
59063  # Check if we need to convert this using DOS-style short mode. If the path
59064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59065  # take no chances and rewrite it.
59066  # Note: m4 eats our [], so we need to use [ and ] instead.
59067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59068  if test "x$has_forbidden_chars" != x; then
59069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59071  fi
59072
59073
59074  windows_path="$new_path"
59075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59076    unix_path=`$CYGPATH -u "$windows_path"`
59077    new_path="$unix_path"
59078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59080    new_path="$unix_path"
59081  fi
59082
59083  if test "x$path" != "x$new_path"; then
59084    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59087  fi
59088
59089  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59090  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59091
59092    else
59093      # We're on a unix platform. Hooray! :)
59094      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59095      has_space=`$ECHO "$path" | $GREP " "`
59096      if test "x$has_space" != x; then
59097        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59098$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59099        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59100      fi
59101
59102      # Use eval to expand a potential ~
59103      eval path="$path"
59104      if test ! -f "$path" && test ! -d "$path"; then
59105        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59106      fi
59107
59108      if test -d "$path"; then
59109        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59110      else
59111        dir="`$DIRNAME "$path"`"
59112        base="`$BASENAME "$path"`"
59113        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59114      fi
59115    fi
59116  fi
59117
59118
59119  # Only process if variable expands to non-empty
59120
59121  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59123
59124  # Input might be given as Windows format, start by converting to
59125  # unix format.
59126  path="$POTENTIAL_FREETYPE_LIB_PATH"
59127  new_path=`$CYGPATH -u "$path"`
59128
59129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59132  # "foo.exe" is OK but "foo" is an error.
59133  #
59134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59135  # It is also a way to make sure we got the proper file name for the real test later on.
59136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59137  if test "x$test_shortpath" = x; then
59138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59140    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59141  fi
59142
59143  # Call helper function which possibly converts this using DOS-style short mode.
59144  # If so, the updated path is stored in $new_path.
59145
59146  input_path="$new_path"
59147  # Check if we need to convert this using DOS-style short mode. If the path
59148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59149  # take no chances and rewrite it.
59150  # Note: m4 eats our [], so we need to use [ and ] instead.
59151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59152  if test "x$has_forbidden_chars" != x; then
59153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59157      # Going to short mode and back again did indeed matter. Since short mode is
59158      # case insensitive, let's make it lowercase to improve readability.
59159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59160      # Now convert it back to Unix-style (cygpath)
59161      input_path=`$CYGPATH -u "$shortmode_path"`
59162      new_path="$input_path"
59163    fi
59164  fi
59165
59166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59167  if test "x$test_cygdrive_prefix" = x; then
59168    # As a simple fix, exclude /usr/bin since it's not a real path.
59169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59171      # a path prefixed by /cygdrive for fixpath to work.
59172      new_path="$CYGWIN_ROOT_PATH$input_path"
59173    fi
59174  fi
59175
59176
59177  if test "x$path" != "x$new_path"; then
59178    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59180$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59181  fi
59182
59183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59184
59185  path="$POTENTIAL_FREETYPE_LIB_PATH"
59186  has_colon=`$ECHO $path | $GREP ^.:`
59187  new_path="$path"
59188  if test "x$has_colon" = x; then
59189    # Not in mixed or Windows style, start by that.
59190    new_path=`cmd //c echo $path`
59191  fi
59192
59193
59194  input_path="$new_path"
59195  # Check if we need to convert this using DOS-style short mode. If the path
59196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59197  # take no chances and rewrite it.
59198  # Note: m4 eats our [], so we need to use [ and ] instead.
59199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59200  if test "x$has_forbidden_chars" != x; then
59201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59203  fi
59204
59205
59206  windows_path="$new_path"
59207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59208    unix_path=`$CYGPATH -u "$windows_path"`
59209    new_path="$unix_path"
59210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59212    new_path="$unix_path"
59213  fi
59214
59215  if test "x$path" != "x$new_path"; then
59216    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59219  fi
59220
59221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59223
59224    else
59225      # We're on a unix platform. Hooray! :)
59226      path="$POTENTIAL_FREETYPE_LIB_PATH"
59227      has_space=`$ECHO "$path" | $GREP " "`
59228      if test "x$has_space" != x; then
59229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59230$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59232      fi
59233
59234      # Use eval to expand a potential ~
59235      eval path="$path"
59236      if test ! -f "$path" && test ! -d "$path"; then
59237        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59238      fi
59239
59240      if test -d "$path"; then
59241        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59242      else
59243        dir="`$DIRNAME "$path"`"
59244        base="`$BASENAME "$path"`"
59245        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59246      fi
59247    fi
59248  fi
59249
59250
59251    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59252    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59253$as_echo_n "checking for freetype includes... " >&6; }
59254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59255$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59256    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59258$as_echo_n "checking for freetype libraries... " >&6; }
59259    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59260$as_echo "$FREETYPE_LIB_PATH" >&6; }
59261  fi
59262
59263            fi
59264            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59265                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59266              # Source is available, as a last resort try to build freetype in default location
59267
59268  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59269  BUILD_FREETYPE=yes
59270
59271  # Check if the freetype sources are acessible..
59272  if ! test -d $FREETYPE_SRC_PATH; then
59273    { $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
59274$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59275    BUILD_FREETYPE=no
59276  fi
59277  # ..and contain a vc2010 project file
59278  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59279  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59280    { $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
59281$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59282    BUILD_FREETYPE=no
59283  fi
59284  # Now check if configure found a version of 'msbuild.exe'
59285  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59286    { $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
59287$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;}
59288    BUILD_FREETYPE=no
59289  fi
59290
59291  # Ready to go..
59292  if test "x$BUILD_FREETYPE" = xyes; then
59293    # msbuild requires trailing slashes for output directories
59294    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59295    freetype_lib_path_unix="$freetype_lib_path"
59296    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59297
59298  unix_path="$vcxproj_path"
59299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59300    windows_path=`$CYGPATH -m "$unix_path"`
59301    vcxproj_path="$windows_path"
59302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59303    windows_path=`cmd //c echo $unix_path`
59304    vcxproj_path="$windows_path"
59305  fi
59306
59307
59308  unix_path="$freetype_lib_path"
59309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59310    windows_path=`$CYGPATH -m "$unix_path"`
59311    freetype_lib_path="$windows_path"
59312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59313    windows_path=`cmd //c echo $unix_path`
59314    freetype_lib_path="$windows_path"
59315  fi
59316
59317
59318  unix_path="$freetype_obj_path"
59319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59320    windows_path=`$CYGPATH -m "$unix_path"`
59321    freetype_obj_path="$windows_path"
59322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59323    windows_path=`cmd //c echo $unix_path`
59324    freetype_obj_path="$windows_path"
59325  fi
59326
59327    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59328      freetype_platform=x64
59329    else
59330      freetype_platform=win32
59331    fi
59332
59333    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59334    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59335    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59336    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59337    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59338$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59339
59340    # First we try to build the freetype.dll
59341    $ECHO -e "@echo off\n"\
59342        "$MSBUILD $vcxproj_path "\
59343        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59344        "/p:Configuration=\"Release Multithreaded\" "\
59345        "/p:Platform=$freetype_platform "\
59346        "/p:ConfigurationType=DynamicLibrary "\
59347        "/p:TargetName=freetype "\
59348        "/p:OutDir=\"$freetype_lib_path\" "\
59349        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59350    cmd /c freetype.bat
59351
59352    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59353      # If that succeeds we also build freetype.lib
59354      $ECHO -e "@echo off\n"\
59355          "$MSBUILD $vcxproj_path "\
59356          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59357          "/p:Configuration=\"Release Multithreaded\" "\
59358          "/p:Platform=$freetype_platform "\
59359          "/p:ConfigurationType=StaticLibrary "\
59360          "/p:TargetName=freetype "\
59361          "/p:OutDir=\"$freetype_lib_path\" "\
59362          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59363      cmd /c freetype.bat
59364
59365      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59366        # Once we build both, lib and dll, set freetype lib and include path appropriately
59367        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59368        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59369        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59370$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59371      else
59372        BUILD_FREETYPE=no
59373      fi
59374    else
59375      BUILD_FREETYPE=no
59376    fi
59377  fi
59378
59379              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59380
59381  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59382  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59383  METHOD="well-known location"
59384
59385  # Let's start with an optimistic view of the world :-)
59386  FOUND_FREETYPE=yes
59387
59388  # First look for the canonical freetype main include file ft2build.h.
59389  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59390    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59391    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59392    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59393      # Fail.
59394      FOUND_FREETYPE=no
59395    fi
59396  fi
59397
59398  if test "x$FOUND_FREETYPE" = xyes; then
59399    # Include file found, let's continue the sanity check.
59400    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59401$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59402
59403    # Reset to default value
59404    FREETYPE_BASE_NAME=freetype
59405    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59406    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59407      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59408          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59409        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59410        # for the .6 version explicitly.
59411        FREETYPE_BASE_NAME=freetype.6
59412        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59413        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59414$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59415      else
59416        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59417$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59418        FOUND_FREETYPE=no
59419      fi
59420    else
59421      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59422        # On Windows, we will need both .lib and .dll file.
59423        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59424          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59425$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59426          FOUND_FREETYPE=no
59427        fi
59428      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59429          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59430        # Found lib in isa dir, use that instead.
59431        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59432        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59433$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59434      fi
59435    fi
59436  fi
59437
59438  if test "x$FOUND_FREETYPE" = xyes; then
59439
59440  # Only process if variable expands to non-empty
59441
59442  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59444
59445  # Input might be given as Windows format, start by converting to
59446  # unix format.
59447  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59448  new_path=`$CYGPATH -u "$path"`
59449
59450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59453  # "foo.exe" is OK but "foo" is an error.
59454  #
59455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59456  # It is also a way to make sure we got the proper file name for the real test later on.
59457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59458  if test "x$test_shortpath" = x; then
59459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59460$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59461    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59462  fi
59463
59464  # Call helper function which possibly converts this using DOS-style short mode.
59465  # If so, the updated path is stored in $new_path.
59466
59467  input_path="$new_path"
59468  # Check if we need to convert this using DOS-style short mode. If the path
59469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59470  # take no chances and rewrite it.
59471  # Note: m4 eats our [], so we need to use [ and ] instead.
59472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59473  if test "x$has_forbidden_chars" != x; then
59474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59478      # Going to short mode and back again did indeed matter. Since short mode is
59479      # case insensitive, let's make it lowercase to improve readability.
59480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59481      # Now convert it back to Unix-style (cygpath)
59482      input_path=`$CYGPATH -u "$shortmode_path"`
59483      new_path="$input_path"
59484    fi
59485  fi
59486
59487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59488  if test "x$test_cygdrive_prefix" = x; then
59489    # As a simple fix, exclude /usr/bin since it's not a real path.
59490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59492      # a path prefixed by /cygdrive for fixpath to work.
59493      new_path="$CYGWIN_ROOT_PATH$input_path"
59494    fi
59495  fi
59496
59497
59498  if test "x$path" != "x$new_path"; then
59499    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59502  fi
59503
59504    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59505
59506  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59507  has_colon=`$ECHO $path | $GREP ^.:`
59508  new_path="$path"
59509  if test "x$has_colon" = x; then
59510    # Not in mixed or Windows style, start by that.
59511    new_path=`cmd //c echo $path`
59512  fi
59513
59514
59515  input_path="$new_path"
59516  # Check if we need to convert this using DOS-style short mode. If the path
59517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59518  # take no chances and rewrite it.
59519  # Note: m4 eats our [], so we need to use [ and ] instead.
59520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59521  if test "x$has_forbidden_chars" != x; then
59522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59524  fi
59525
59526
59527  windows_path="$new_path"
59528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59529    unix_path=`$CYGPATH -u "$windows_path"`
59530    new_path="$unix_path"
59531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59533    new_path="$unix_path"
59534  fi
59535
59536  if test "x$path" != "x$new_path"; then
59537    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59540  fi
59541
59542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59544
59545    else
59546      # We're on a unix platform. Hooray! :)
59547      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59548      has_space=`$ECHO "$path" | $GREP " "`
59549      if test "x$has_space" != x; then
59550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59551$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59552        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59553      fi
59554
59555      # Use eval to expand a potential ~
59556      eval path="$path"
59557      if test ! -f "$path" && test ! -d "$path"; then
59558        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59559      fi
59560
59561      if test -d "$path"; then
59562        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59563      else
59564        dir="`$DIRNAME "$path"`"
59565        base="`$BASENAME "$path"`"
59566        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59567      fi
59568    fi
59569  fi
59570
59571
59572  # Only process if variable expands to non-empty
59573
59574  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59576
59577  # Input might be given as Windows format, start by converting to
59578  # unix format.
59579  path="$POTENTIAL_FREETYPE_LIB_PATH"
59580  new_path=`$CYGPATH -u "$path"`
59581
59582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59585  # "foo.exe" is OK but "foo" is an error.
59586  #
59587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59588  # It is also a way to make sure we got the proper file name for the real test later on.
59589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59590  if test "x$test_shortpath" = x; then
59591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59593    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59594  fi
59595
59596  # Call helper function which possibly converts this using DOS-style short mode.
59597  # If so, the updated path is stored in $new_path.
59598
59599  input_path="$new_path"
59600  # Check if we need to convert this using DOS-style short mode. If the path
59601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59602  # take no chances and rewrite it.
59603  # Note: m4 eats our [], so we need to use [ and ] instead.
59604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59605  if test "x$has_forbidden_chars" != x; then
59606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59610      # Going to short mode and back again did indeed matter. Since short mode is
59611      # case insensitive, let's make it lowercase to improve readability.
59612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59613      # Now convert it back to Unix-style (cygpath)
59614      input_path=`$CYGPATH -u "$shortmode_path"`
59615      new_path="$input_path"
59616    fi
59617  fi
59618
59619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59620  if test "x$test_cygdrive_prefix" = x; then
59621    # As a simple fix, exclude /usr/bin since it's not a real path.
59622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59624      # a path prefixed by /cygdrive for fixpath to work.
59625      new_path="$CYGWIN_ROOT_PATH$input_path"
59626    fi
59627  fi
59628
59629
59630  if test "x$path" != "x$new_path"; then
59631    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59634  fi
59635
59636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59637
59638  path="$POTENTIAL_FREETYPE_LIB_PATH"
59639  has_colon=`$ECHO $path | $GREP ^.:`
59640  new_path="$path"
59641  if test "x$has_colon" = x; then
59642    # Not in mixed or Windows style, start by that.
59643    new_path=`cmd //c echo $path`
59644  fi
59645
59646
59647  input_path="$new_path"
59648  # Check if we need to convert this using DOS-style short mode. If the path
59649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59650  # take no chances and rewrite it.
59651  # Note: m4 eats our [], so we need to use [ and ] instead.
59652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59653  if test "x$has_forbidden_chars" != x; then
59654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59656  fi
59657
59658
59659  windows_path="$new_path"
59660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59661    unix_path=`$CYGPATH -u "$windows_path"`
59662    new_path="$unix_path"
59663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59665    new_path="$unix_path"
59666  fi
59667
59668  if test "x$path" != "x$new_path"; then
59669    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59672  fi
59673
59674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59676
59677    else
59678      # We're on a unix platform. Hooray! :)
59679      path="$POTENTIAL_FREETYPE_LIB_PATH"
59680      has_space=`$ECHO "$path" | $GREP " "`
59681      if test "x$has_space" != x; then
59682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59683$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59685      fi
59686
59687      # Use eval to expand a potential ~
59688      eval path="$path"
59689      if test ! -f "$path" && test ! -d "$path"; then
59690        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59691      fi
59692
59693      if test -d "$path"; then
59694        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59695      else
59696        dir="`$DIRNAME "$path"`"
59697        base="`$BASENAME "$path"`"
59698        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59699      fi
59700    fi
59701  fi
59702
59703
59704    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59705    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59706$as_echo_n "checking for freetype includes... " >&6; }
59707    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59708$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59709    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59711$as_echo_n "checking for freetype libraries... " >&6; }
59712    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59713$as_echo "$FREETYPE_LIB_PATH" >&6; }
59714  fi
59715
59716              else
59717
59718  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59719  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59720  METHOD="well-known location"
59721
59722  # Let's start with an optimistic view of the world :-)
59723  FOUND_FREETYPE=yes
59724
59725  # First look for the canonical freetype main include file ft2build.h.
59726  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59727    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59728    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59729    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59730      # Fail.
59731      FOUND_FREETYPE=no
59732    fi
59733  fi
59734
59735  if test "x$FOUND_FREETYPE" = xyes; then
59736    # Include file found, let's continue the sanity check.
59737    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59738$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59739
59740    # Reset to default value
59741    FREETYPE_BASE_NAME=freetype
59742    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59743    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59744      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59745          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59746        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59747        # for the .6 version explicitly.
59748        FREETYPE_BASE_NAME=freetype.6
59749        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59750        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59751$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59752      else
59753        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59754$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59755        FOUND_FREETYPE=no
59756      fi
59757    else
59758      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59759        # On Windows, we will need both .lib and .dll file.
59760        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59761          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59762$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59763          FOUND_FREETYPE=no
59764        fi
59765      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59766          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59767        # Found lib in isa dir, use that instead.
59768        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59769        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59770$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59771      fi
59772    fi
59773  fi
59774
59775  if test "x$FOUND_FREETYPE" = xyes; then
59776
59777  # Only process if variable expands to non-empty
59778
59779  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59781
59782  # Input might be given as Windows format, start by converting to
59783  # unix format.
59784  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59785  new_path=`$CYGPATH -u "$path"`
59786
59787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59790  # "foo.exe" is OK but "foo" is an error.
59791  #
59792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59793  # It is also a way to make sure we got the proper file name for the real test later on.
59794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59795  if test "x$test_shortpath" = x; then
59796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59799  fi
59800
59801  # Call helper function which possibly converts this using DOS-style short mode.
59802  # If so, the updated path is stored in $new_path.
59803
59804  input_path="$new_path"
59805  # Check if we need to convert this using DOS-style short mode. If the path
59806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59807  # take no chances and rewrite it.
59808  # Note: m4 eats our [], so we need to use [ and ] instead.
59809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59810  if test "x$has_forbidden_chars" != x; then
59811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59815      # Going to short mode and back again did indeed matter. Since short mode is
59816      # case insensitive, let's make it lowercase to improve readability.
59817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59818      # Now convert it back to Unix-style (cygpath)
59819      input_path=`$CYGPATH -u "$shortmode_path"`
59820      new_path="$input_path"
59821    fi
59822  fi
59823
59824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59825  if test "x$test_cygdrive_prefix" = x; then
59826    # As a simple fix, exclude /usr/bin since it's not a real path.
59827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59829      # a path prefixed by /cygdrive for fixpath to work.
59830      new_path="$CYGWIN_ROOT_PATH$input_path"
59831    fi
59832  fi
59833
59834
59835  if test "x$path" != "x$new_path"; then
59836    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59839  fi
59840
59841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59842
59843  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59844  has_colon=`$ECHO $path | $GREP ^.:`
59845  new_path="$path"
59846  if test "x$has_colon" = x; then
59847    # Not in mixed or Windows style, start by that.
59848    new_path=`cmd //c echo $path`
59849  fi
59850
59851
59852  input_path="$new_path"
59853  # Check if we need to convert this using DOS-style short mode. If the path
59854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59855  # take no chances and rewrite it.
59856  # Note: m4 eats our [], so we need to use [ and ] instead.
59857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59858  if test "x$has_forbidden_chars" != x; then
59859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59861  fi
59862
59863
59864  windows_path="$new_path"
59865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59866    unix_path=`$CYGPATH -u "$windows_path"`
59867    new_path="$unix_path"
59868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59870    new_path="$unix_path"
59871  fi
59872
59873  if test "x$path" != "x$new_path"; then
59874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59877  fi
59878
59879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59881
59882    else
59883      # We're on a unix platform. Hooray! :)
59884      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59885      has_space=`$ECHO "$path" | $GREP " "`
59886      if test "x$has_space" != x; then
59887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59890      fi
59891
59892      # Use eval to expand a potential ~
59893      eval path="$path"
59894      if test ! -f "$path" && test ! -d "$path"; then
59895        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59896      fi
59897
59898      if test -d "$path"; then
59899        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59900      else
59901        dir="`$DIRNAME "$path"`"
59902        base="`$BASENAME "$path"`"
59903        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59904      fi
59905    fi
59906  fi
59907
59908
59909  # Only process if variable expands to non-empty
59910
59911  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59913
59914  # Input might be given as Windows format, start by converting to
59915  # unix format.
59916  path="$POTENTIAL_FREETYPE_LIB_PATH"
59917  new_path=`$CYGPATH -u "$path"`
59918
59919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59922  # "foo.exe" is OK but "foo" is an error.
59923  #
59924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59925  # It is also a way to make sure we got the proper file name for the real test later on.
59926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59927  if test "x$test_shortpath" = x; then
59928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59930    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59931  fi
59932
59933  # Call helper function which possibly converts this using DOS-style short mode.
59934  # If so, the updated path is stored in $new_path.
59935
59936  input_path="$new_path"
59937  # Check if we need to convert this using DOS-style short mode. If the path
59938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59939  # take no chances and rewrite it.
59940  # Note: m4 eats our [], so we need to use [ and ] instead.
59941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59942  if test "x$has_forbidden_chars" != x; then
59943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59947      # Going to short mode and back again did indeed matter. Since short mode is
59948      # case insensitive, let's make it lowercase to improve readability.
59949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59950      # Now convert it back to Unix-style (cygpath)
59951      input_path=`$CYGPATH -u "$shortmode_path"`
59952      new_path="$input_path"
59953    fi
59954  fi
59955
59956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59957  if test "x$test_cygdrive_prefix" = x; then
59958    # As a simple fix, exclude /usr/bin since it's not a real path.
59959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59961      # a path prefixed by /cygdrive for fixpath to work.
59962      new_path="$CYGWIN_ROOT_PATH$input_path"
59963    fi
59964  fi
59965
59966
59967  if test "x$path" != "x$new_path"; then
59968    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59971  fi
59972
59973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59974
59975  path="$POTENTIAL_FREETYPE_LIB_PATH"
59976  has_colon=`$ECHO $path | $GREP ^.:`
59977  new_path="$path"
59978  if test "x$has_colon" = x; then
59979    # Not in mixed or Windows style, start by that.
59980    new_path=`cmd //c echo $path`
59981  fi
59982
59983
59984  input_path="$new_path"
59985  # Check if we need to convert this using DOS-style short mode. If the path
59986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59987  # take no chances and rewrite it.
59988  # Note: m4 eats our [], so we need to use [ and ] instead.
59989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59990  if test "x$has_forbidden_chars" != x; then
59991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59993  fi
59994
59995
59996  windows_path="$new_path"
59997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59998    unix_path=`$CYGPATH -u "$windows_path"`
59999    new_path="$unix_path"
60000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60002    new_path="$unix_path"
60003  fi
60004
60005  if test "x$path" != "x$new_path"; then
60006    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60009  fi
60010
60011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60013
60014    else
60015      # We're on a unix platform. Hooray! :)
60016      path="$POTENTIAL_FREETYPE_LIB_PATH"
60017      has_space=`$ECHO "$path" | $GREP " "`
60018      if test "x$has_space" != x; then
60019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60022      fi
60023
60024      # Use eval to expand a potential ~
60025      eval path="$path"
60026      if test ! -f "$path" && test ! -d "$path"; then
60027        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60028      fi
60029
60030      if test -d "$path"; then
60031        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60032      else
60033        dir="`$DIRNAME "$path"`"
60034        base="`$BASENAME "$path"`"
60035        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60036      fi
60037    fi
60038  fi
60039
60040
60041    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60043$as_echo_n "checking for freetype includes... " >&6; }
60044    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60045$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60046    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60048$as_echo_n "checking for freetype libraries... " >&6; }
60049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60050$as_echo "$FREETYPE_LIB_PATH" >&6; }
60051  fi
60052
60053              fi
60054            fi
60055          fi
60056        else
60057          FREETYPE_BASE_DIR="$SYSROOT/usr"
60058
60059  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60060  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60061  METHOD="well-known location"
60062
60063  # Let's start with an optimistic view of the world :-)
60064  FOUND_FREETYPE=yes
60065
60066  # First look for the canonical freetype main include file ft2build.h.
60067  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60068    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60069    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60070    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60071      # Fail.
60072      FOUND_FREETYPE=no
60073    fi
60074  fi
60075
60076  if test "x$FOUND_FREETYPE" = xyes; then
60077    # Include file found, let's continue the sanity check.
60078    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60079$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60080
60081    # Reset to default value
60082    FREETYPE_BASE_NAME=freetype
60083    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60084    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60085      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60086          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60087        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60088        # for the .6 version explicitly.
60089        FREETYPE_BASE_NAME=freetype.6
60090        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60091        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60092$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60093      else
60094        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60095$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60096        FOUND_FREETYPE=no
60097      fi
60098    else
60099      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60100        # On Windows, we will need both .lib and .dll file.
60101        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60102          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60103$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60104          FOUND_FREETYPE=no
60105        fi
60106      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60107          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60108        # Found lib in isa dir, use that instead.
60109        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60110        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60111$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60112      fi
60113    fi
60114  fi
60115
60116  if test "x$FOUND_FREETYPE" = xyes; then
60117
60118  # Only process if variable expands to non-empty
60119
60120  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60122
60123  # Input might be given as Windows format, start by converting to
60124  # unix format.
60125  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60126  new_path=`$CYGPATH -u "$path"`
60127
60128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60131  # "foo.exe" is OK but "foo" is an error.
60132  #
60133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60134  # It is also a way to make sure we got the proper file name for the real test later on.
60135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60136  if test "x$test_shortpath" = x; then
60137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60139    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60140  fi
60141
60142  # Call helper function which possibly converts this using DOS-style short mode.
60143  # If so, the updated path is stored in $new_path.
60144
60145  input_path="$new_path"
60146  # Check if we need to convert this using DOS-style short mode. If the path
60147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60148  # take no chances and rewrite it.
60149  # Note: m4 eats our [], so we need to use [ and ] instead.
60150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60151  if test "x$has_forbidden_chars" != x; then
60152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60156      # Going to short mode and back again did indeed matter. Since short mode is
60157      # case insensitive, let's make it lowercase to improve readability.
60158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60159      # Now convert it back to Unix-style (cygpath)
60160      input_path=`$CYGPATH -u "$shortmode_path"`
60161      new_path="$input_path"
60162    fi
60163  fi
60164
60165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60166  if test "x$test_cygdrive_prefix" = x; then
60167    # As a simple fix, exclude /usr/bin since it's not a real path.
60168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60170      # a path prefixed by /cygdrive for fixpath to work.
60171      new_path="$CYGWIN_ROOT_PATH$input_path"
60172    fi
60173  fi
60174
60175
60176  if test "x$path" != "x$new_path"; then
60177    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60179$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60180  fi
60181
60182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60183
60184  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60185  has_colon=`$ECHO $path | $GREP ^.:`
60186  new_path="$path"
60187  if test "x$has_colon" = x; then
60188    # Not in mixed or Windows style, start by that.
60189    new_path=`cmd //c echo $path`
60190  fi
60191
60192
60193  input_path="$new_path"
60194  # Check if we need to convert this using DOS-style short mode. If the path
60195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60196  # take no chances and rewrite it.
60197  # Note: m4 eats our [], so we need to use [ and ] instead.
60198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60199  if test "x$has_forbidden_chars" != x; then
60200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60202  fi
60203
60204
60205  windows_path="$new_path"
60206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60207    unix_path=`$CYGPATH -u "$windows_path"`
60208    new_path="$unix_path"
60209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60211    new_path="$unix_path"
60212  fi
60213
60214  if test "x$path" != "x$new_path"; then
60215    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60217$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60218  fi
60219
60220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60222
60223    else
60224      # We're on a unix platform. Hooray! :)
60225      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60226      has_space=`$ECHO "$path" | $GREP " "`
60227      if test "x$has_space" != x; then
60228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60229$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60231      fi
60232
60233      # Use eval to expand a potential ~
60234      eval path="$path"
60235      if test ! -f "$path" && test ! -d "$path"; then
60236        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60237      fi
60238
60239      if test -d "$path"; then
60240        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60241      else
60242        dir="`$DIRNAME "$path"`"
60243        base="`$BASENAME "$path"`"
60244        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60245      fi
60246    fi
60247  fi
60248
60249
60250  # Only process if variable expands to non-empty
60251
60252  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60253    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60254
60255  # Input might be given as Windows format, start by converting to
60256  # unix format.
60257  path="$POTENTIAL_FREETYPE_LIB_PATH"
60258  new_path=`$CYGPATH -u "$path"`
60259
60260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60263  # "foo.exe" is OK but "foo" is an error.
60264  #
60265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60266  # It is also a way to make sure we got the proper file name for the real test later on.
60267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60268  if test "x$test_shortpath" = x; then
60269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60271    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60272  fi
60273
60274  # Call helper function which possibly converts this using DOS-style short mode.
60275  # If so, the updated path is stored in $new_path.
60276
60277  input_path="$new_path"
60278  # Check if we need to convert this using DOS-style short mode. If the path
60279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60280  # take no chances and rewrite it.
60281  # Note: m4 eats our [], so we need to use [ and ] instead.
60282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60283  if test "x$has_forbidden_chars" != x; then
60284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60288      # Going to short mode and back again did indeed matter. Since short mode is
60289      # case insensitive, let's make it lowercase to improve readability.
60290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60291      # Now convert it back to Unix-style (cygpath)
60292      input_path=`$CYGPATH -u "$shortmode_path"`
60293      new_path="$input_path"
60294    fi
60295  fi
60296
60297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60298  if test "x$test_cygdrive_prefix" = x; then
60299    # As a simple fix, exclude /usr/bin since it's not a real path.
60300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60302      # a path prefixed by /cygdrive for fixpath to work.
60303      new_path="$CYGWIN_ROOT_PATH$input_path"
60304    fi
60305  fi
60306
60307
60308  if test "x$path" != "x$new_path"; then
60309    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60312  fi
60313
60314    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60315
60316  path="$POTENTIAL_FREETYPE_LIB_PATH"
60317  has_colon=`$ECHO $path | $GREP ^.:`
60318  new_path="$path"
60319  if test "x$has_colon" = x; then
60320    # Not in mixed or Windows style, start by that.
60321    new_path=`cmd //c echo $path`
60322  fi
60323
60324
60325  input_path="$new_path"
60326  # Check if we need to convert this using DOS-style short mode. If the path
60327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60328  # take no chances and rewrite it.
60329  # Note: m4 eats our [], so we need to use [ and ] instead.
60330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60331  if test "x$has_forbidden_chars" != x; then
60332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60334  fi
60335
60336
60337  windows_path="$new_path"
60338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60339    unix_path=`$CYGPATH -u "$windows_path"`
60340    new_path="$unix_path"
60341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60343    new_path="$unix_path"
60344  fi
60345
60346  if test "x$path" != "x$new_path"; then
60347    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60349$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60350  fi
60351
60352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60354
60355    else
60356      # We're on a unix platform. Hooray! :)
60357      path="$POTENTIAL_FREETYPE_LIB_PATH"
60358      has_space=`$ECHO "$path" | $GREP " "`
60359      if test "x$has_space" != x; then
60360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60361$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60362        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60363      fi
60364
60365      # Use eval to expand a potential ~
60366      eval path="$path"
60367      if test ! -f "$path" && test ! -d "$path"; then
60368        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60369      fi
60370
60371      if test -d "$path"; then
60372        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60373      else
60374        dir="`$DIRNAME "$path"`"
60375        base="`$BASENAME "$path"`"
60376        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60377      fi
60378    fi
60379  fi
60380
60381
60382    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60384$as_echo_n "checking for freetype includes... " >&6; }
60385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60386$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60387    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60388    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60389$as_echo_n "checking for freetype libraries... " >&6; }
60390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60391$as_echo "$FREETYPE_LIB_PATH" >&6; }
60392  fi
60393
60394
60395          if test "x$FOUND_FREETYPE" != xyes; then
60396            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60397
60398  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60399  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60400  METHOD="well-known location"
60401
60402  # Let's start with an optimistic view of the world :-)
60403  FOUND_FREETYPE=yes
60404
60405  # First look for the canonical freetype main include file ft2build.h.
60406  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60407    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60408    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60409    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60410      # Fail.
60411      FOUND_FREETYPE=no
60412    fi
60413  fi
60414
60415  if test "x$FOUND_FREETYPE" = xyes; then
60416    # Include file found, let's continue the sanity check.
60417    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60418$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60419
60420    # Reset to default value
60421    FREETYPE_BASE_NAME=freetype
60422    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60423    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60424      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60425          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60426        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60427        # for the .6 version explicitly.
60428        FREETYPE_BASE_NAME=freetype.6
60429        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60430        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60431$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60432      else
60433        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60434$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60435        FOUND_FREETYPE=no
60436      fi
60437    else
60438      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60439        # On Windows, we will need both .lib and .dll file.
60440        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60441          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60442$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60443          FOUND_FREETYPE=no
60444        fi
60445      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60446          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60447        # Found lib in isa dir, use that instead.
60448        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60449        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60450$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60451      fi
60452    fi
60453  fi
60454
60455  if test "x$FOUND_FREETYPE" = xyes; then
60456
60457  # Only process if variable expands to non-empty
60458
60459  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60461
60462  # Input might be given as Windows format, start by converting to
60463  # unix format.
60464  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60465  new_path=`$CYGPATH -u "$path"`
60466
60467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60470  # "foo.exe" is OK but "foo" is an error.
60471  #
60472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60473  # It is also a way to make sure we got the proper file name for the real test later on.
60474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60475  if test "x$test_shortpath" = x; then
60476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60477$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60478    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60479  fi
60480
60481  # Call helper function which possibly converts this using DOS-style short mode.
60482  # If so, the updated path is stored in $new_path.
60483
60484  input_path="$new_path"
60485  # Check if we need to convert this using DOS-style short mode. If the path
60486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60487  # take no chances and rewrite it.
60488  # Note: m4 eats our [], so we need to use [ and ] instead.
60489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60490  if test "x$has_forbidden_chars" != x; then
60491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60495      # Going to short mode and back again did indeed matter. Since short mode is
60496      # case insensitive, let's make it lowercase to improve readability.
60497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60498      # Now convert it back to Unix-style (cygpath)
60499      input_path=`$CYGPATH -u "$shortmode_path"`
60500      new_path="$input_path"
60501    fi
60502  fi
60503
60504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60505  if test "x$test_cygdrive_prefix" = x; then
60506    # As a simple fix, exclude /usr/bin since it's not a real path.
60507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60509      # a path prefixed by /cygdrive for fixpath to work.
60510      new_path="$CYGWIN_ROOT_PATH$input_path"
60511    fi
60512  fi
60513
60514
60515  if test "x$path" != "x$new_path"; then
60516    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60518$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60519  fi
60520
60521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60522
60523  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60524  has_colon=`$ECHO $path | $GREP ^.:`
60525  new_path="$path"
60526  if test "x$has_colon" = x; then
60527    # Not in mixed or Windows style, start by that.
60528    new_path=`cmd //c echo $path`
60529  fi
60530
60531
60532  input_path="$new_path"
60533  # Check if we need to convert this using DOS-style short mode. If the path
60534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60535  # take no chances and rewrite it.
60536  # Note: m4 eats our [], so we need to use [ and ] instead.
60537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60538  if test "x$has_forbidden_chars" != x; then
60539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60541  fi
60542
60543
60544  windows_path="$new_path"
60545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60546    unix_path=`$CYGPATH -u "$windows_path"`
60547    new_path="$unix_path"
60548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60550    new_path="$unix_path"
60551  fi
60552
60553  if test "x$path" != "x$new_path"; then
60554    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60556$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60557  fi
60558
60559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60561
60562    else
60563      # We're on a unix platform. Hooray! :)
60564      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60565      has_space=`$ECHO "$path" | $GREP " "`
60566      if test "x$has_space" != x; then
60567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60568$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60570      fi
60571
60572      # Use eval to expand a potential ~
60573      eval path="$path"
60574      if test ! -f "$path" && test ! -d "$path"; then
60575        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60576      fi
60577
60578      if test -d "$path"; then
60579        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60580      else
60581        dir="`$DIRNAME "$path"`"
60582        base="`$BASENAME "$path"`"
60583        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60584      fi
60585    fi
60586  fi
60587
60588
60589  # Only process if variable expands to non-empty
60590
60591  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60592    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60593
60594  # Input might be given as Windows format, start by converting to
60595  # unix format.
60596  path="$POTENTIAL_FREETYPE_LIB_PATH"
60597  new_path=`$CYGPATH -u "$path"`
60598
60599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60602  # "foo.exe" is OK but "foo" is an error.
60603  #
60604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60605  # It is also a way to make sure we got the proper file name for the real test later on.
60606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60607  if test "x$test_shortpath" = x; then
60608    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60609$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60610    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60611  fi
60612
60613  # Call helper function which possibly converts this using DOS-style short mode.
60614  # If so, the updated path is stored in $new_path.
60615
60616  input_path="$new_path"
60617  # Check if we need to convert this using DOS-style short mode. If the path
60618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60619  # take no chances and rewrite it.
60620  # Note: m4 eats our [], so we need to use [ and ] instead.
60621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60622  if test "x$has_forbidden_chars" != x; then
60623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60627      # Going to short mode and back again did indeed matter. Since short mode is
60628      # case insensitive, let's make it lowercase to improve readability.
60629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60630      # Now convert it back to Unix-style (cygpath)
60631      input_path=`$CYGPATH -u "$shortmode_path"`
60632      new_path="$input_path"
60633    fi
60634  fi
60635
60636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60637  if test "x$test_cygdrive_prefix" = x; then
60638    # As a simple fix, exclude /usr/bin since it's not a real path.
60639    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60641      # a path prefixed by /cygdrive for fixpath to work.
60642      new_path="$CYGWIN_ROOT_PATH$input_path"
60643    fi
60644  fi
60645
60646
60647  if test "x$path" != "x$new_path"; then
60648    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60649    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60650$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60651  fi
60652
60653    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60654
60655  path="$POTENTIAL_FREETYPE_LIB_PATH"
60656  has_colon=`$ECHO $path | $GREP ^.:`
60657  new_path="$path"
60658  if test "x$has_colon" = x; then
60659    # Not in mixed or Windows style, start by that.
60660    new_path=`cmd //c echo $path`
60661  fi
60662
60663
60664  input_path="$new_path"
60665  # Check if we need to convert this using DOS-style short mode. If the path
60666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60667  # take no chances and rewrite it.
60668  # Note: m4 eats our [], so we need to use [ and ] instead.
60669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60670  if test "x$has_forbidden_chars" != x; then
60671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60672    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60673  fi
60674
60675
60676  windows_path="$new_path"
60677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60678    unix_path=`$CYGPATH -u "$windows_path"`
60679    new_path="$unix_path"
60680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60682    new_path="$unix_path"
60683  fi
60684
60685  if test "x$path" != "x$new_path"; then
60686    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60688$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60689  fi
60690
60691  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60692  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60693
60694    else
60695      # We're on a unix platform. Hooray! :)
60696      path="$POTENTIAL_FREETYPE_LIB_PATH"
60697      has_space=`$ECHO "$path" | $GREP " "`
60698      if test "x$has_space" != x; then
60699        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60700$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60701        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60702      fi
60703
60704      # Use eval to expand a potential ~
60705      eval path="$path"
60706      if test ! -f "$path" && test ! -d "$path"; then
60707        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60708      fi
60709
60710      if test -d "$path"; then
60711        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60712      else
60713        dir="`$DIRNAME "$path"`"
60714        base="`$BASENAME "$path"`"
60715        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60716      fi
60717    fi
60718  fi
60719
60720
60721    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60723$as_echo_n "checking for freetype includes... " >&6; }
60724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60725$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60726    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60728$as_echo_n "checking for freetype libraries... " >&6; }
60729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60730$as_echo "$FREETYPE_LIB_PATH" >&6; }
60731  fi
60732
60733          fi
60734
60735          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60736            if test "x$FOUND_FREETYPE" != xyes; then
60737              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60738              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60739
60740  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60741  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60742  METHOD="well-known location"
60743
60744  # Let's start with an optimistic view of the world :-)
60745  FOUND_FREETYPE=yes
60746
60747  # First look for the canonical freetype main include file ft2build.h.
60748  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60749    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60750    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60751    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60752      # Fail.
60753      FOUND_FREETYPE=no
60754    fi
60755  fi
60756
60757  if test "x$FOUND_FREETYPE" = xyes; then
60758    # Include file found, let's continue the sanity check.
60759    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60760$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60761
60762    # Reset to default value
60763    FREETYPE_BASE_NAME=freetype
60764    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60765    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60766      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60767          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60768        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60769        # for the .6 version explicitly.
60770        FREETYPE_BASE_NAME=freetype.6
60771        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60772        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60773$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60774      else
60775        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60776$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60777        FOUND_FREETYPE=no
60778      fi
60779    else
60780      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60781        # On Windows, we will need both .lib and .dll file.
60782        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60783          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60784$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60785          FOUND_FREETYPE=no
60786        fi
60787      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60788          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60789        # Found lib in isa dir, use that instead.
60790        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60791        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60792$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60793      fi
60794    fi
60795  fi
60796
60797  if test "x$FOUND_FREETYPE" = xyes; then
60798
60799  # Only process if variable expands to non-empty
60800
60801  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60803
60804  # Input might be given as Windows format, start by converting to
60805  # unix format.
60806  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60807  new_path=`$CYGPATH -u "$path"`
60808
60809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60812  # "foo.exe" is OK but "foo" is an error.
60813  #
60814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60815  # It is also a way to make sure we got the proper file name for the real test later on.
60816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60817  if test "x$test_shortpath" = x; then
60818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60819$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60820    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60821  fi
60822
60823  # Call helper function which possibly converts this using DOS-style short mode.
60824  # If so, the updated path is stored in $new_path.
60825
60826  input_path="$new_path"
60827  # Check if we need to convert this using DOS-style short mode. If the path
60828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60829  # take no chances and rewrite it.
60830  # Note: m4 eats our [], so we need to use [ and ] instead.
60831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60832  if test "x$has_forbidden_chars" != x; then
60833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60837      # Going to short mode and back again did indeed matter. Since short mode is
60838      # case insensitive, let's make it lowercase to improve readability.
60839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60840      # Now convert it back to Unix-style (cygpath)
60841      input_path=`$CYGPATH -u "$shortmode_path"`
60842      new_path="$input_path"
60843    fi
60844  fi
60845
60846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60847  if test "x$test_cygdrive_prefix" = x; then
60848    # As a simple fix, exclude /usr/bin since it's not a real path.
60849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60851      # a path prefixed by /cygdrive for fixpath to work.
60852      new_path="$CYGWIN_ROOT_PATH$input_path"
60853    fi
60854  fi
60855
60856
60857  if test "x$path" != "x$new_path"; then
60858    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60860$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60861  fi
60862
60863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60864
60865  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60866  has_colon=`$ECHO $path | $GREP ^.:`
60867  new_path="$path"
60868  if test "x$has_colon" = x; then
60869    # Not in mixed or Windows style, start by that.
60870    new_path=`cmd //c echo $path`
60871  fi
60872
60873
60874  input_path="$new_path"
60875  # Check if we need to convert this using DOS-style short mode. If the path
60876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60877  # take no chances and rewrite it.
60878  # Note: m4 eats our [], so we need to use [ and ] instead.
60879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60880  if test "x$has_forbidden_chars" != x; then
60881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60883  fi
60884
60885
60886  windows_path="$new_path"
60887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60888    unix_path=`$CYGPATH -u "$windows_path"`
60889    new_path="$unix_path"
60890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60892    new_path="$unix_path"
60893  fi
60894
60895  if test "x$path" != "x$new_path"; then
60896    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60898$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60899  fi
60900
60901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60903
60904    else
60905      # We're on a unix platform. Hooray! :)
60906      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60907      has_space=`$ECHO "$path" | $GREP " "`
60908      if test "x$has_space" != x; then
60909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60910$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60912      fi
60913
60914      # Use eval to expand a potential ~
60915      eval path="$path"
60916      if test ! -f "$path" && test ! -d "$path"; then
60917        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60918      fi
60919
60920      if test -d "$path"; then
60921        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60922      else
60923        dir="`$DIRNAME "$path"`"
60924        base="`$BASENAME "$path"`"
60925        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60926      fi
60927    fi
60928  fi
60929
60930
60931  # Only process if variable expands to non-empty
60932
60933  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60934    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60935
60936  # Input might be given as Windows format, start by converting to
60937  # unix format.
60938  path="$POTENTIAL_FREETYPE_LIB_PATH"
60939  new_path=`$CYGPATH -u "$path"`
60940
60941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60944  # "foo.exe" is OK but "foo" is an error.
60945  #
60946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60947  # It is also a way to make sure we got the proper file name for the real test later on.
60948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60949  if test "x$test_shortpath" = x; then
60950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60951$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60952    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60953  fi
60954
60955  # Call helper function which possibly converts this using DOS-style short mode.
60956  # If so, the updated path is stored in $new_path.
60957
60958  input_path="$new_path"
60959  # Check if we need to convert this using DOS-style short mode. If the path
60960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60961  # take no chances and rewrite it.
60962  # Note: m4 eats our [], so we need to use [ and ] instead.
60963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60964  if test "x$has_forbidden_chars" != x; then
60965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60969      # Going to short mode and back again did indeed matter. Since short mode is
60970      # case insensitive, let's make it lowercase to improve readability.
60971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60972      # Now convert it back to Unix-style (cygpath)
60973      input_path=`$CYGPATH -u "$shortmode_path"`
60974      new_path="$input_path"
60975    fi
60976  fi
60977
60978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60979  if test "x$test_cygdrive_prefix" = x; then
60980    # As a simple fix, exclude /usr/bin since it's not a real path.
60981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60983      # a path prefixed by /cygdrive for fixpath to work.
60984      new_path="$CYGWIN_ROOT_PATH$input_path"
60985    fi
60986  fi
60987
60988
60989  if test "x$path" != "x$new_path"; then
60990    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60993  fi
60994
60995    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60996
60997  path="$POTENTIAL_FREETYPE_LIB_PATH"
60998  has_colon=`$ECHO $path | $GREP ^.:`
60999  new_path="$path"
61000  if test "x$has_colon" = x; then
61001    # Not in mixed or Windows style, start by that.
61002    new_path=`cmd //c echo $path`
61003  fi
61004
61005
61006  input_path="$new_path"
61007  # Check if we need to convert this using DOS-style short mode. If the path
61008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61009  # take no chances and rewrite it.
61010  # Note: m4 eats our [], so we need to use [ and ] instead.
61011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61012  if test "x$has_forbidden_chars" != x; then
61013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61015  fi
61016
61017
61018  windows_path="$new_path"
61019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61020    unix_path=`$CYGPATH -u "$windows_path"`
61021    new_path="$unix_path"
61022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61024    new_path="$unix_path"
61025  fi
61026
61027  if test "x$path" != "x$new_path"; then
61028    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61030$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61031  fi
61032
61033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61035
61036    else
61037      # We're on a unix platform. Hooray! :)
61038      path="$POTENTIAL_FREETYPE_LIB_PATH"
61039      has_space=`$ECHO "$path" | $GREP " "`
61040      if test "x$has_space" != x; then
61041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61043        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61044      fi
61045
61046      # Use eval to expand a potential ~
61047      eval path="$path"
61048      if test ! -f "$path" && test ! -d "$path"; then
61049        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61050      fi
61051
61052      if test -d "$path"; then
61053        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61054      else
61055        dir="`$DIRNAME "$path"`"
61056        base="`$BASENAME "$path"`"
61057        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61058      fi
61059    fi
61060  fi
61061
61062
61063    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61065$as_echo_n "checking for freetype includes... " >&6; }
61066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61067$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61068    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61070$as_echo_n "checking for freetype libraries... " >&6; }
61071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61072$as_echo "$FREETYPE_LIB_PATH" >&6; }
61073  fi
61074
61075            fi
61076          fi
61077
61078          if test "x$FOUND_FREETYPE" != xyes; then
61079            FREETYPE_BASE_DIR="$SYSROOT/usr"
61080            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61081
61082  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61083  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61084  METHOD="well-known location"
61085
61086  # Let's start with an optimistic view of the world :-)
61087  FOUND_FREETYPE=yes
61088
61089  # First look for the canonical freetype main include file ft2build.h.
61090  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61091    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61092    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61093    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61094      # Fail.
61095      FOUND_FREETYPE=no
61096    fi
61097  fi
61098
61099  if test "x$FOUND_FREETYPE" = xyes; then
61100    # Include file found, let's continue the sanity check.
61101    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61102$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61103
61104    # Reset to default value
61105    FREETYPE_BASE_NAME=freetype
61106    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61107    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61108      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61109          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61110        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61111        # for the .6 version explicitly.
61112        FREETYPE_BASE_NAME=freetype.6
61113        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61114        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61115$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61116      else
61117        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61118$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61119        FOUND_FREETYPE=no
61120      fi
61121    else
61122      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61123        # On Windows, we will need both .lib and .dll file.
61124        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61125          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61126$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61127          FOUND_FREETYPE=no
61128        fi
61129      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61130          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61131        # Found lib in isa dir, use that instead.
61132        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61133        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61134$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61135      fi
61136    fi
61137  fi
61138
61139  if test "x$FOUND_FREETYPE" = xyes; then
61140
61141  # Only process if variable expands to non-empty
61142
61143  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61144    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61145
61146  # Input might be given as Windows format, start by converting to
61147  # unix format.
61148  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61149  new_path=`$CYGPATH -u "$path"`
61150
61151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61154  # "foo.exe" is OK but "foo" is an error.
61155  #
61156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61157  # It is also a way to make sure we got the proper file name for the real test later on.
61158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61159  if test "x$test_shortpath" = x; then
61160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61161$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61162    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61163  fi
61164
61165  # Call helper function which possibly converts this using DOS-style short mode.
61166  # If so, the updated path is stored in $new_path.
61167
61168  input_path="$new_path"
61169  # Check if we need to convert this using DOS-style short mode. If the path
61170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61171  # take no chances and rewrite it.
61172  # Note: m4 eats our [], so we need to use [ and ] instead.
61173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61174  if test "x$has_forbidden_chars" != x; then
61175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61179      # Going to short mode and back again did indeed matter. Since short mode is
61180      # case insensitive, let's make it lowercase to improve readability.
61181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61182      # Now convert it back to Unix-style (cygpath)
61183      input_path=`$CYGPATH -u "$shortmode_path"`
61184      new_path="$input_path"
61185    fi
61186  fi
61187
61188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61189  if test "x$test_cygdrive_prefix" = x; then
61190    # As a simple fix, exclude /usr/bin since it's not a real path.
61191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61193      # a path prefixed by /cygdrive for fixpath to work.
61194      new_path="$CYGWIN_ROOT_PATH$input_path"
61195    fi
61196  fi
61197
61198
61199  if test "x$path" != "x$new_path"; then
61200    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61202$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61203  fi
61204
61205    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61206
61207  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61208  has_colon=`$ECHO $path | $GREP ^.:`
61209  new_path="$path"
61210  if test "x$has_colon" = x; then
61211    # Not in mixed or Windows style, start by that.
61212    new_path=`cmd //c echo $path`
61213  fi
61214
61215
61216  input_path="$new_path"
61217  # Check if we need to convert this using DOS-style short mode. If the path
61218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61219  # take no chances and rewrite it.
61220  # Note: m4 eats our [], so we need to use [ and ] instead.
61221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61222  if test "x$has_forbidden_chars" != x; then
61223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61225  fi
61226
61227
61228  windows_path="$new_path"
61229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61230    unix_path=`$CYGPATH -u "$windows_path"`
61231    new_path="$unix_path"
61232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61234    new_path="$unix_path"
61235  fi
61236
61237  if test "x$path" != "x$new_path"; then
61238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61241  fi
61242
61243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61245
61246    else
61247      # We're on a unix platform. Hooray! :)
61248      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61249      has_space=`$ECHO "$path" | $GREP " "`
61250      if test "x$has_space" != x; then
61251        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61252$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61253        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61254      fi
61255
61256      # Use eval to expand a potential ~
61257      eval path="$path"
61258      if test ! -f "$path" && test ! -d "$path"; then
61259        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61260      fi
61261
61262      if test -d "$path"; then
61263        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61264      else
61265        dir="`$DIRNAME "$path"`"
61266        base="`$BASENAME "$path"`"
61267        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61268      fi
61269    fi
61270  fi
61271
61272
61273  # Only process if variable expands to non-empty
61274
61275  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61277
61278  # Input might be given as Windows format, start by converting to
61279  # unix format.
61280  path="$POTENTIAL_FREETYPE_LIB_PATH"
61281  new_path=`$CYGPATH -u "$path"`
61282
61283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61286  # "foo.exe" is OK but "foo" is an error.
61287  #
61288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61289  # It is also a way to make sure we got the proper file name for the real test later on.
61290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61291  if test "x$test_shortpath" = x; then
61292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61294    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61295  fi
61296
61297  # Call helper function which possibly converts this using DOS-style short mode.
61298  # If so, the updated path is stored in $new_path.
61299
61300  input_path="$new_path"
61301  # Check if we need to convert this using DOS-style short mode. If the path
61302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61303  # take no chances and rewrite it.
61304  # Note: m4 eats our [], so we need to use [ and ] instead.
61305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61306  if test "x$has_forbidden_chars" != x; then
61307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61311      # Going to short mode and back again did indeed matter. Since short mode is
61312      # case insensitive, let's make it lowercase to improve readability.
61313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61314      # Now convert it back to Unix-style (cygpath)
61315      input_path=`$CYGPATH -u "$shortmode_path"`
61316      new_path="$input_path"
61317    fi
61318  fi
61319
61320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61321  if test "x$test_cygdrive_prefix" = x; then
61322    # As a simple fix, exclude /usr/bin since it's not a real path.
61323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61325      # a path prefixed by /cygdrive for fixpath to work.
61326      new_path="$CYGWIN_ROOT_PATH$input_path"
61327    fi
61328  fi
61329
61330
61331  if test "x$path" != "x$new_path"; then
61332    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61335  fi
61336
61337    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61338
61339  path="$POTENTIAL_FREETYPE_LIB_PATH"
61340  has_colon=`$ECHO $path | $GREP ^.:`
61341  new_path="$path"
61342  if test "x$has_colon" = x; then
61343    # Not in mixed or Windows style, start by that.
61344    new_path=`cmd //c echo $path`
61345  fi
61346
61347
61348  input_path="$new_path"
61349  # Check if we need to convert this using DOS-style short mode. If the path
61350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61351  # take no chances and rewrite it.
61352  # Note: m4 eats our [], so we need to use [ and ] instead.
61353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61354  if test "x$has_forbidden_chars" != x; then
61355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61357  fi
61358
61359
61360  windows_path="$new_path"
61361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61362    unix_path=`$CYGPATH -u "$windows_path"`
61363    new_path="$unix_path"
61364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61366    new_path="$unix_path"
61367  fi
61368
61369  if test "x$path" != "x$new_path"; then
61370    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61373  fi
61374
61375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61377
61378    else
61379      # We're on a unix platform. Hooray! :)
61380      path="$POTENTIAL_FREETYPE_LIB_PATH"
61381      has_space=`$ECHO "$path" | $GREP " "`
61382      if test "x$has_space" != x; then
61383        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61385        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61386      fi
61387
61388      # Use eval to expand a potential ~
61389      eval path="$path"
61390      if test ! -f "$path" && test ! -d "$path"; then
61391        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61392      fi
61393
61394      if test -d "$path"; then
61395        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61396      else
61397        dir="`$DIRNAME "$path"`"
61398        base="`$BASENAME "$path"`"
61399        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61400      fi
61401    fi
61402  fi
61403
61404
61405    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61406    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61407$as_echo_n "checking for freetype includes... " >&6; }
61408    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61409$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61410    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61412$as_echo_n "checking for freetype libraries... " >&6; }
61413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61414$as_echo "$FREETYPE_LIB_PATH" >&6; }
61415  fi
61416
61417            else
61418
61419  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61420  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61421  METHOD="well-known location"
61422
61423  # Let's start with an optimistic view of the world :-)
61424  FOUND_FREETYPE=yes
61425
61426  # First look for the canonical freetype main include file ft2build.h.
61427  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61428    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61429    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61430    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61431      # Fail.
61432      FOUND_FREETYPE=no
61433    fi
61434  fi
61435
61436  if test "x$FOUND_FREETYPE" = xyes; then
61437    # Include file found, let's continue the sanity check.
61438    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61439$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61440
61441    # Reset to default value
61442    FREETYPE_BASE_NAME=freetype
61443    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61444    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61445      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61446          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61447        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61448        # for the .6 version explicitly.
61449        FREETYPE_BASE_NAME=freetype.6
61450        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61451        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61452$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61453      else
61454        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61455$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61456        FOUND_FREETYPE=no
61457      fi
61458    else
61459      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61460        # On Windows, we will need both .lib and .dll file.
61461        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61462          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61463$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61464          FOUND_FREETYPE=no
61465        fi
61466      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61467          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61468        # Found lib in isa dir, use that instead.
61469        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61470        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61471$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61472      fi
61473    fi
61474  fi
61475
61476  if test "x$FOUND_FREETYPE" = xyes; then
61477
61478  # Only process if variable expands to non-empty
61479
61480  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61481    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61482
61483  # Input might be given as Windows format, start by converting to
61484  # unix format.
61485  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61486  new_path=`$CYGPATH -u "$path"`
61487
61488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61491  # "foo.exe" is OK but "foo" is an error.
61492  #
61493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61494  # It is also a way to make sure we got the proper file name for the real test later on.
61495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61496  if test "x$test_shortpath" = x; then
61497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61498$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61499    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61500  fi
61501
61502  # Call helper function which possibly converts this using DOS-style short mode.
61503  # If so, the updated path is stored in $new_path.
61504
61505  input_path="$new_path"
61506  # Check if we need to convert this using DOS-style short mode. If the path
61507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61508  # take no chances and rewrite it.
61509  # Note: m4 eats our [], so we need to use [ and ] instead.
61510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61511  if test "x$has_forbidden_chars" != x; then
61512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61516      # Going to short mode and back again did indeed matter. Since short mode is
61517      # case insensitive, let's make it lowercase to improve readability.
61518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61519      # Now convert it back to Unix-style (cygpath)
61520      input_path=`$CYGPATH -u "$shortmode_path"`
61521      new_path="$input_path"
61522    fi
61523  fi
61524
61525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61526  if test "x$test_cygdrive_prefix" = x; then
61527    # As a simple fix, exclude /usr/bin since it's not a real path.
61528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61530      # a path prefixed by /cygdrive for fixpath to work.
61531      new_path="$CYGWIN_ROOT_PATH$input_path"
61532    fi
61533  fi
61534
61535
61536  if test "x$path" != "x$new_path"; then
61537    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61539$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61540  fi
61541
61542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61543
61544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61545  has_colon=`$ECHO $path | $GREP ^.:`
61546  new_path="$path"
61547  if test "x$has_colon" = x; then
61548    # Not in mixed or Windows style, start by that.
61549    new_path=`cmd //c echo $path`
61550  fi
61551
61552
61553  input_path="$new_path"
61554  # Check if we need to convert this using DOS-style short mode. If the path
61555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61556  # take no chances and rewrite it.
61557  # Note: m4 eats our [], so we need to use [ and ] instead.
61558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61559  if test "x$has_forbidden_chars" != x; then
61560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61562  fi
61563
61564
61565  windows_path="$new_path"
61566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61567    unix_path=`$CYGPATH -u "$windows_path"`
61568    new_path="$unix_path"
61569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61571    new_path="$unix_path"
61572  fi
61573
61574  if test "x$path" != "x$new_path"; then
61575    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61578  fi
61579
61580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61582
61583    else
61584      # We're on a unix platform. Hooray! :)
61585      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61586      has_space=`$ECHO "$path" | $GREP " "`
61587      if test "x$has_space" != x; then
61588        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61589$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61590        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61591      fi
61592
61593      # Use eval to expand a potential ~
61594      eval path="$path"
61595      if test ! -f "$path" && test ! -d "$path"; then
61596        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61597      fi
61598
61599      if test -d "$path"; then
61600        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61601      else
61602        dir="`$DIRNAME "$path"`"
61603        base="`$BASENAME "$path"`"
61604        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61605      fi
61606    fi
61607  fi
61608
61609
61610  # Only process if variable expands to non-empty
61611
61612  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61613    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61614
61615  # Input might be given as Windows format, start by converting to
61616  # unix format.
61617  path="$POTENTIAL_FREETYPE_LIB_PATH"
61618  new_path=`$CYGPATH -u "$path"`
61619
61620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61623  # "foo.exe" is OK but "foo" is an error.
61624  #
61625  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61626  # It is also a way to make sure we got the proper file name for the real test later on.
61627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61628  if test "x$test_shortpath" = x; then
61629    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61630$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61631    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61632  fi
61633
61634  # Call helper function which possibly converts this using DOS-style short mode.
61635  # If so, the updated path is stored in $new_path.
61636
61637  input_path="$new_path"
61638  # Check if we need to convert this using DOS-style short mode. If the path
61639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61640  # take no chances and rewrite it.
61641  # Note: m4 eats our [], so we need to use [ and ] instead.
61642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61643  if test "x$has_forbidden_chars" != x; then
61644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61645    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61646    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61647    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61648      # Going to short mode and back again did indeed matter. Since short mode is
61649      # case insensitive, let's make it lowercase to improve readability.
61650      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61651      # Now convert it back to Unix-style (cygpath)
61652      input_path=`$CYGPATH -u "$shortmode_path"`
61653      new_path="$input_path"
61654    fi
61655  fi
61656
61657  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61658  if test "x$test_cygdrive_prefix" = x; then
61659    # As a simple fix, exclude /usr/bin since it's not a real path.
61660    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61661      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61662      # a path prefixed by /cygdrive for fixpath to work.
61663      new_path="$CYGWIN_ROOT_PATH$input_path"
61664    fi
61665  fi
61666
61667
61668  if test "x$path" != "x$new_path"; then
61669    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61672  fi
61673
61674    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61675
61676  path="$POTENTIAL_FREETYPE_LIB_PATH"
61677  has_colon=`$ECHO $path | $GREP ^.:`
61678  new_path="$path"
61679  if test "x$has_colon" = x; then
61680    # Not in mixed or Windows style, start by that.
61681    new_path=`cmd //c echo $path`
61682  fi
61683
61684
61685  input_path="$new_path"
61686  # Check if we need to convert this using DOS-style short mode. If the path
61687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61688  # take no chances and rewrite it.
61689  # Note: m4 eats our [], so we need to use [ and ] instead.
61690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61691  if test "x$has_forbidden_chars" != x; then
61692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61694  fi
61695
61696
61697  windows_path="$new_path"
61698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61699    unix_path=`$CYGPATH -u "$windows_path"`
61700    new_path="$unix_path"
61701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61703    new_path="$unix_path"
61704  fi
61705
61706  if test "x$path" != "x$new_path"; then
61707    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61709$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61710  fi
61711
61712  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61713  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61714
61715    else
61716      # We're on a unix platform. Hooray! :)
61717      path="$POTENTIAL_FREETYPE_LIB_PATH"
61718      has_space=`$ECHO "$path" | $GREP " "`
61719      if test "x$has_space" != x; then
61720        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61721$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61722        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61723      fi
61724
61725      # Use eval to expand a potential ~
61726      eval path="$path"
61727      if test ! -f "$path" && test ! -d "$path"; then
61728        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61729      fi
61730
61731      if test -d "$path"; then
61732        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61733      else
61734        dir="`$DIRNAME "$path"`"
61735        base="`$BASENAME "$path"`"
61736        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61737      fi
61738    fi
61739  fi
61740
61741
61742    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61744$as_echo_n "checking for freetype includes... " >&6; }
61745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61746$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61747    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61749$as_echo_n "checking for freetype libraries... " >&6; }
61750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61751$as_echo "$FREETYPE_LIB_PATH" >&6; }
61752  fi
61753
61754              if test "x$FOUND_FREETYPE" != xyes; then
61755
61756  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61757  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61758  METHOD="well-known location"
61759
61760  # Let's start with an optimistic view of the world :-)
61761  FOUND_FREETYPE=yes
61762
61763  # First look for the canonical freetype main include file ft2build.h.
61764  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61765    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61766    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61767    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61768      # Fail.
61769      FOUND_FREETYPE=no
61770    fi
61771  fi
61772
61773  if test "x$FOUND_FREETYPE" = xyes; then
61774    # Include file found, let's continue the sanity check.
61775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61776$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61777
61778    # Reset to default value
61779    FREETYPE_BASE_NAME=freetype
61780    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61781    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61782      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61783          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61784        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61785        # for the .6 version explicitly.
61786        FREETYPE_BASE_NAME=freetype.6
61787        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61788        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61789$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61790      else
61791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61792$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61793        FOUND_FREETYPE=no
61794      fi
61795    else
61796      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61797        # On Windows, we will need both .lib and .dll file.
61798        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61799          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61800$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61801          FOUND_FREETYPE=no
61802        fi
61803      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61805        # Found lib in isa dir, use that instead.
61806        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61807        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61808$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61809      fi
61810    fi
61811  fi
61812
61813  if test "x$FOUND_FREETYPE" = xyes; then
61814
61815  # Only process if variable expands to non-empty
61816
61817  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61819
61820  # Input might be given as Windows format, start by converting to
61821  # unix format.
61822  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61823  new_path=`$CYGPATH -u "$path"`
61824
61825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61828  # "foo.exe" is OK but "foo" is an error.
61829  #
61830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61831  # It is also a way to make sure we got the proper file name for the real test later on.
61832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61833  if test "x$test_shortpath" = x; then
61834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61837  fi
61838
61839  # Call helper function which possibly converts this using DOS-style short mode.
61840  # If so, the updated path is stored in $new_path.
61841
61842  input_path="$new_path"
61843  # Check if we need to convert this using DOS-style short mode. If the path
61844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61845  # take no chances and rewrite it.
61846  # Note: m4 eats our [], so we need to use [ and ] instead.
61847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61848  if test "x$has_forbidden_chars" != x; then
61849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61853      # Going to short mode and back again did indeed matter. Since short mode is
61854      # case insensitive, let's make it lowercase to improve readability.
61855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61856      # Now convert it back to Unix-style (cygpath)
61857      input_path=`$CYGPATH -u "$shortmode_path"`
61858      new_path="$input_path"
61859    fi
61860  fi
61861
61862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61863  if test "x$test_cygdrive_prefix" = x; then
61864    # As a simple fix, exclude /usr/bin since it's not a real path.
61865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61867      # a path prefixed by /cygdrive for fixpath to work.
61868      new_path="$CYGWIN_ROOT_PATH$input_path"
61869    fi
61870  fi
61871
61872
61873  if test "x$path" != "x$new_path"; then
61874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61877  fi
61878
61879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61880
61881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61882  has_colon=`$ECHO $path | $GREP ^.:`
61883  new_path="$path"
61884  if test "x$has_colon" = x; then
61885    # Not in mixed or Windows style, start by that.
61886    new_path=`cmd //c echo $path`
61887  fi
61888
61889
61890  input_path="$new_path"
61891  # Check if we need to convert this using DOS-style short mode. If the path
61892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61893  # take no chances and rewrite it.
61894  # Note: m4 eats our [], so we need to use [ and ] instead.
61895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61896  if test "x$has_forbidden_chars" != x; then
61897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61899  fi
61900
61901
61902  windows_path="$new_path"
61903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61904    unix_path=`$CYGPATH -u "$windows_path"`
61905    new_path="$unix_path"
61906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61908    new_path="$unix_path"
61909  fi
61910
61911  if test "x$path" != "x$new_path"; then
61912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61915  fi
61916
61917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61919
61920    else
61921      # We're on a unix platform. Hooray! :)
61922      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61923      has_space=`$ECHO "$path" | $GREP " "`
61924      if test "x$has_space" != x; then
61925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61928      fi
61929
61930      # Use eval to expand a potential ~
61931      eval path="$path"
61932      if test ! -f "$path" && test ! -d "$path"; then
61933        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61934      fi
61935
61936      if test -d "$path"; then
61937        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61938      else
61939        dir="`$DIRNAME "$path"`"
61940        base="`$BASENAME "$path"`"
61941        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61942      fi
61943    fi
61944  fi
61945
61946
61947  # Only process if variable expands to non-empty
61948
61949  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61951
61952  # Input might be given as Windows format, start by converting to
61953  # unix format.
61954  path="$POTENTIAL_FREETYPE_LIB_PATH"
61955  new_path=`$CYGPATH -u "$path"`
61956
61957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61960  # "foo.exe" is OK but "foo" is an error.
61961  #
61962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61963  # It is also a way to make sure we got the proper file name for the real test later on.
61964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61965  if test "x$test_shortpath" = x; then
61966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61967$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61968    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61969  fi
61970
61971  # Call helper function which possibly converts this using DOS-style short mode.
61972  # If so, the updated path is stored in $new_path.
61973
61974  input_path="$new_path"
61975  # Check if we need to convert this using DOS-style short mode. If the path
61976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61977  # take no chances and rewrite it.
61978  # Note: m4 eats our [], so we need to use [ and ] instead.
61979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61980  if test "x$has_forbidden_chars" != x; then
61981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61985      # Going to short mode and back again did indeed matter. Since short mode is
61986      # case insensitive, let's make it lowercase to improve readability.
61987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61988      # Now convert it back to Unix-style (cygpath)
61989      input_path=`$CYGPATH -u "$shortmode_path"`
61990      new_path="$input_path"
61991    fi
61992  fi
61993
61994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61995  if test "x$test_cygdrive_prefix" = x; then
61996    # As a simple fix, exclude /usr/bin since it's not a real path.
61997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61999      # a path prefixed by /cygdrive for fixpath to work.
62000      new_path="$CYGWIN_ROOT_PATH$input_path"
62001    fi
62002  fi
62003
62004
62005  if test "x$path" != "x$new_path"; then
62006    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62009  fi
62010
62011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62012
62013  path="$POTENTIAL_FREETYPE_LIB_PATH"
62014  has_colon=`$ECHO $path | $GREP ^.:`
62015  new_path="$path"
62016  if test "x$has_colon" = x; then
62017    # Not in mixed or Windows style, start by that.
62018    new_path=`cmd //c echo $path`
62019  fi
62020
62021
62022  input_path="$new_path"
62023  # Check if we need to convert this using DOS-style short mode. If the path
62024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62025  # take no chances and rewrite it.
62026  # Note: m4 eats our [], so we need to use [ and ] instead.
62027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62028  if test "x$has_forbidden_chars" != x; then
62029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62031  fi
62032
62033
62034  windows_path="$new_path"
62035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62036    unix_path=`$CYGPATH -u "$windows_path"`
62037    new_path="$unix_path"
62038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62040    new_path="$unix_path"
62041  fi
62042
62043  if test "x$path" != "x$new_path"; then
62044    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62046$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62047  fi
62048
62049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62051
62052    else
62053      # We're on a unix platform. Hooray! :)
62054      path="$POTENTIAL_FREETYPE_LIB_PATH"
62055      has_space=`$ECHO "$path" | $GREP " "`
62056      if test "x$has_space" != x; then
62057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62058$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62060      fi
62061
62062      # Use eval to expand a potential ~
62063      eval path="$path"
62064      if test ! -f "$path" && test ! -d "$path"; then
62065        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62066      fi
62067
62068      if test -d "$path"; then
62069        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62070      else
62071        dir="`$DIRNAME "$path"`"
62072        base="`$BASENAME "$path"`"
62073        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62074      fi
62075    fi
62076  fi
62077
62078
62079    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62081$as_echo_n "checking for freetype includes... " >&6; }
62082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62083$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62084    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62086$as_echo_n "checking for freetype libraries... " >&6; }
62087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62088$as_echo "$FREETYPE_LIB_PATH" >&6; }
62089  fi
62090
62091              fi
62092            fi
62093          fi
62094        fi
62095      fi # end check in well-known locations
62096
62097      if test "x$FOUND_FREETYPE" != xyes; then
62098
62099  # Print a helpful message on how to acquire the necessary build dependency.
62100  # freetype is the help tag: freetype, cups, alsa etc
62101  MISSING_DEPENDENCY=freetype
62102
62103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62104    cygwin_help $MISSING_DEPENDENCY
62105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62106    msys_help $MISSING_DEPENDENCY
62107  else
62108    PKGHANDLER_COMMAND=
62109
62110    case $PKGHANDLER in
62111      apt-get)
62112        apt_help     $MISSING_DEPENDENCY ;;
62113      yum)
62114        yum_help     $MISSING_DEPENDENCY ;;
62115      port)
62116        port_help    $MISSING_DEPENDENCY ;;
62117      pkgutil)
62118        pkgutil_help $MISSING_DEPENDENCY ;;
62119      pkgadd)
62120        pkgadd_help  $MISSING_DEPENDENCY ;;
62121    esac
62122
62123    if test "x$PKGHANDLER_COMMAND" != x; then
62124      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62125    fi
62126  fi
62127
62128        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62129      fi
62130    fi # end user specified settings
62131
62132    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62133    if test "x$FREETYPE_CFLAGS" = x; then
62134
62135  # Only process if variable expands to non-empty
62136
62137  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62138    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62139
62140  # Input might be given as Windows format, start by converting to
62141  # unix format.
62142  path="$FREETYPE_INCLUDE_PATH"
62143  new_path=`$CYGPATH -u "$path"`
62144
62145  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62146  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62147  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62148  # "foo.exe" is OK but "foo" is an error.
62149  #
62150  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62151  # It is also a way to make sure we got the proper file name for the real test later on.
62152  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62153  if test "x$test_shortpath" = x; then
62154    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62155$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62156    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62157  fi
62158
62159  # Call helper function which possibly converts this using DOS-style short mode.
62160  # If so, the updated path is stored in $new_path.
62161
62162  input_path="$new_path"
62163  # Check if we need to convert this using DOS-style short mode. If the path
62164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62165  # take no chances and rewrite it.
62166  # Note: m4 eats our [], so we need to use [ and ] instead.
62167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62168  if test "x$has_forbidden_chars" != x; then
62169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62173      # Going to short mode and back again did indeed matter. Since short mode is
62174      # case insensitive, let's make it lowercase to improve readability.
62175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62176      # Now convert it back to Unix-style (cygpath)
62177      input_path=`$CYGPATH -u "$shortmode_path"`
62178      new_path="$input_path"
62179    fi
62180  fi
62181
62182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62183  if test "x$test_cygdrive_prefix" = x; then
62184    # As a simple fix, exclude /usr/bin since it's not a real path.
62185    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62187      # a path prefixed by /cygdrive for fixpath to work.
62188      new_path="$CYGWIN_ROOT_PATH$input_path"
62189    fi
62190  fi
62191
62192
62193  if test "x$path" != "x$new_path"; then
62194    FREETYPE_INCLUDE_PATH="$new_path"
62195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62196$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62197  fi
62198
62199    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62200
62201  path="$FREETYPE_INCLUDE_PATH"
62202  has_colon=`$ECHO $path | $GREP ^.:`
62203  new_path="$path"
62204  if test "x$has_colon" = x; then
62205    # Not in mixed or Windows style, start by that.
62206    new_path=`cmd //c echo $path`
62207  fi
62208
62209
62210  input_path="$new_path"
62211  # Check if we need to convert this using DOS-style short mode. If the path
62212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62213  # take no chances and rewrite it.
62214  # Note: m4 eats our [], so we need to use [ and ] instead.
62215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62216  if test "x$has_forbidden_chars" != x; then
62217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62219  fi
62220
62221
62222  windows_path="$new_path"
62223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62224    unix_path=`$CYGPATH -u "$windows_path"`
62225    new_path="$unix_path"
62226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62228    new_path="$unix_path"
62229  fi
62230
62231  if test "x$path" != "x$new_path"; then
62232    FREETYPE_INCLUDE_PATH="$new_path"
62233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62234$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62235  fi
62236
62237  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62238  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62239
62240    else
62241      # We're on a unix platform. Hooray! :)
62242      path="$FREETYPE_INCLUDE_PATH"
62243      has_space=`$ECHO "$path" | $GREP " "`
62244      if test "x$has_space" != x; then
62245        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62246$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62247        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62248      fi
62249
62250      # Use eval to expand a potential ~
62251      eval path="$path"
62252      if test ! -f "$path" && test ! -d "$path"; then
62253        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62254      fi
62255
62256      if test -d "$path"; then
62257        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62258      else
62259        dir="`$DIRNAME "$path"`"
62260        base="`$BASENAME "$path"`"
62261        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62262      fi
62263    fi
62264  fi
62265
62266      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62267        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62268      else
62269        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62270      fi
62271    fi
62272
62273    if test "x$FREETYPE_LIBS" = x; then
62274
62275  # Only process if variable expands to non-empty
62276
62277  if test "x$FREETYPE_LIB_PATH" != x; then
62278    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62279
62280  # Input might be given as Windows format, start by converting to
62281  # unix format.
62282  path="$FREETYPE_LIB_PATH"
62283  new_path=`$CYGPATH -u "$path"`
62284
62285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62288  # "foo.exe" is OK but "foo" is an error.
62289  #
62290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62291  # It is also a way to make sure we got the proper file name for the real test later on.
62292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62293  if test "x$test_shortpath" = x; then
62294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62295$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62296    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62297  fi
62298
62299  # Call helper function which possibly converts this using DOS-style short mode.
62300  # If so, the updated path is stored in $new_path.
62301
62302  input_path="$new_path"
62303  # Check if we need to convert this using DOS-style short mode. If the path
62304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62305  # take no chances and rewrite it.
62306  # Note: m4 eats our [], so we need to use [ and ] instead.
62307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62308  if test "x$has_forbidden_chars" != x; then
62309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62313      # Going to short mode and back again did indeed matter. Since short mode is
62314      # case insensitive, let's make it lowercase to improve readability.
62315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62316      # Now convert it back to Unix-style (cygpath)
62317      input_path=`$CYGPATH -u "$shortmode_path"`
62318      new_path="$input_path"
62319    fi
62320  fi
62321
62322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62323  if test "x$test_cygdrive_prefix" = x; then
62324    # As a simple fix, exclude /usr/bin since it's not a real path.
62325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62327      # a path prefixed by /cygdrive for fixpath to work.
62328      new_path="$CYGWIN_ROOT_PATH$input_path"
62329    fi
62330  fi
62331
62332
62333  if test "x$path" != "x$new_path"; then
62334    FREETYPE_LIB_PATH="$new_path"
62335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62336$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62337  fi
62338
62339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62340
62341  path="$FREETYPE_LIB_PATH"
62342  has_colon=`$ECHO $path | $GREP ^.:`
62343  new_path="$path"
62344  if test "x$has_colon" = x; then
62345    # Not in mixed or Windows style, start by that.
62346    new_path=`cmd //c echo $path`
62347  fi
62348
62349
62350  input_path="$new_path"
62351  # Check if we need to convert this using DOS-style short mode. If the path
62352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62353  # take no chances and rewrite it.
62354  # Note: m4 eats our [], so we need to use [ and ] instead.
62355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62356  if test "x$has_forbidden_chars" != x; then
62357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62359  fi
62360
62361
62362  windows_path="$new_path"
62363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62364    unix_path=`$CYGPATH -u "$windows_path"`
62365    new_path="$unix_path"
62366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62368    new_path="$unix_path"
62369  fi
62370
62371  if test "x$path" != "x$new_path"; then
62372    FREETYPE_LIB_PATH="$new_path"
62373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62374$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62375  fi
62376
62377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62379
62380    else
62381      # We're on a unix platform. Hooray! :)
62382      path="$FREETYPE_LIB_PATH"
62383      has_space=`$ECHO "$path" | $GREP " "`
62384      if test "x$has_space" != x; then
62385        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62386$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62387        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62388      fi
62389
62390      # Use eval to expand a potential ~
62391      eval path="$path"
62392      if test ! -f "$path" && test ! -d "$path"; then
62393        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62394      fi
62395
62396      if test -d "$path"; then
62397        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62398      else
62399        dir="`$DIRNAME "$path"`"
62400        base="`$BASENAME "$path"`"
62401        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62402      fi
62403    fi
62404  fi
62405
62406      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62407        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62408      else
62409        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62410      fi
62411    fi
62412
62413    # Try to compile it
62414    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62415$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62416    ac_ext=cpp
62417ac_cpp='$CXXCPP $CPPFLAGS'
62418ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62419ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62420ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62421
62422    PREV_CXXCFLAGS="$CXXFLAGS"
62423    PREV_LIBS="$LIBS"
62424    PREV_CXX="$CXX"
62425    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62426    LIBS="$LIBS $FREETYPE_LIBS"
62427    CXX="$FIXPATH $CXX"
62428    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62429/* end confdefs.h.  */
62430
62431          #include<ft2build.h>
62432          #include FT_FREETYPE_H
62433          int main () {
62434            FT_Init_FreeType(NULL);
62435            return 0;
62436          }
62437
62438_ACEOF
62439if ac_fn_cxx_try_link "$LINENO"; then :
62440
62441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62442$as_echo "yes" >&6; }
62443
62444else
62445
62446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62447$as_echo "no" >&6; }
62448          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62449$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62450          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62451$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62452
62453
62454  # Print a helpful message on how to acquire the necessary build dependency.
62455  # freetype is the help tag: freetype, cups, alsa etc
62456  MISSING_DEPENDENCY=freetype
62457
62458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62459    cygwin_help $MISSING_DEPENDENCY
62460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62461    msys_help $MISSING_DEPENDENCY
62462  else
62463    PKGHANDLER_COMMAND=
62464
62465    case $PKGHANDLER in
62466      apt-get)
62467        apt_help     $MISSING_DEPENDENCY ;;
62468      yum)
62469        yum_help     $MISSING_DEPENDENCY ;;
62470      port)
62471        port_help    $MISSING_DEPENDENCY ;;
62472      pkgutil)
62473        pkgutil_help $MISSING_DEPENDENCY ;;
62474      pkgadd)
62475        pkgadd_help  $MISSING_DEPENDENCY ;;
62476    esac
62477
62478    if test "x$PKGHANDLER_COMMAND" != x; then
62479      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62480    fi
62481  fi
62482
62483
62484          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62485
62486
62487fi
62488rm -f core conftest.err conftest.$ac_objext \
62489    conftest$ac_exeext conftest.$ac_ext
62490    CXXCFLAGS="$PREV_CXXFLAGS"
62491    LIBS="$PREV_LIBS"
62492    CXX="$PREV_CXX"
62493    ac_ext=cpp
62494ac_cpp='$CXXCPP $CPPFLAGS'
62495ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62496ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62497ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62498
62499
62500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62501$as_echo_n "checking if we should bundle freetype... " >&6; }
62502    if test "x$BUNDLE_FREETYPE" = xyes; then
62503      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62504    fi
62505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62506$as_echo "$BUNDLE_FREETYPE" >&6; }
62507
62508  fi # end freetype needed
62509
62510
62511
62512
62513
62514
62515
62516# Check whether --with-alsa was given.
62517if test "${with_alsa+set}" = set; then :
62518  withval=$with_alsa;
62519fi
62520
62521
62522# Check whether --with-alsa-include was given.
62523if test "${with_alsa_include+set}" = set; then :
62524  withval=$with_alsa_include;
62525fi
62526
62527
62528# Check whether --with-alsa-lib was given.
62529if test "${with_alsa_lib+set}" = set; then :
62530  withval=$with_alsa_lib;
62531fi
62532
62533
62534  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62535    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62536        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62537        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62538      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62539$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62540    fi
62541    ALSA_CFLAGS=
62542    ALSA_LIBS=
62543  else
62544    ALSA_FOUND=no
62545
62546    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62547      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62548    fi
62549
62550    if test "x${with_alsa}" != x; then
62551      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62552      ALSA_CFLAGS="-I${with_alsa}/include"
62553      ALSA_FOUND=yes
62554    fi
62555    if test "x${with_alsa_include}" != x; then
62556      ALSA_CFLAGS="-I${with_alsa_include}"
62557      ALSA_FOUND=yes
62558    fi
62559    if test "x${with_alsa_lib}" != x; then
62560      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62561      ALSA_FOUND=yes
62562    fi
62563    # Do not try pkg-config if we have a sysroot set.
62564    if test "x$SYSROOT" = x; then
62565      if test "x$ALSA_FOUND" = xno; then
62566
62567pkg_failed=no
62568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62569$as_echo_n "checking for ALSA... " >&6; }
62570
62571if test -n "$ALSA_CFLAGS"; then
62572    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62573 elif test -n "$PKG_CONFIG"; then
62574    if test -n "$PKG_CONFIG" && \
62575    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62576  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62577  ac_status=$?
62578  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62579  test $ac_status = 0; }; then
62580  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62581else
62582  pkg_failed=yes
62583fi
62584 else
62585    pkg_failed=untried
62586fi
62587if test -n "$ALSA_LIBS"; then
62588    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62589 elif test -n "$PKG_CONFIG"; then
62590    if test -n "$PKG_CONFIG" && \
62591    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62592  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62593  ac_status=$?
62594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62595  test $ac_status = 0; }; then
62596  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62597else
62598  pkg_failed=yes
62599fi
62600 else
62601    pkg_failed=untried
62602fi
62603
62604
62605
62606if test $pkg_failed = yes; then
62607
62608if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62609        _pkg_short_errors_supported=yes
62610else
62611        _pkg_short_errors_supported=no
62612fi
62613        if test $_pkg_short_errors_supported = yes; then
62614	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62615        else
62616	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62617        fi
62618	# Put the nasty error message in config.log where it belongs
62619	echo "$ALSA_PKG_ERRORS" >&5
62620
62621	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62622$as_echo "no" >&6; }
62623                ALSA_FOUND=no
62624elif test $pkg_failed = untried; then
62625	ALSA_FOUND=no
62626else
62627	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62628	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62629        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62630$as_echo "yes" >&6; }
62631	ALSA_FOUND=yes
62632fi
62633      fi
62634    fi
62635    if test "x$ALSA_FOUND" = xno; then
62636      for ac_header in alsa/asoundlib.h
62637do :
62638  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62639if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62640  cat >>confdefs.h <<_ACEOF
62641#define HAVE_ALSA_ASOUNDLIB_H 1
62642_ACEOF
62643
62644            ALSA_FOUND=yes
62645            ALSA_CFLAGS=-Iignoreme
62646            ALSA_LIBS=-lasound
62647            DEFAULT_ALSA=yes
62648
62649else
62650  ALSA_FOUND=no
62651
62652fi
62653
62654done
62655
62656    fi
62657    if test "x$ALSA_FOUND" = xno; then
62658
62659  # Print a helpful message on how to acquire the necessary build dependency.
62660  # alsa is the help tag: freetype, cups, alsa etc
62661  MISSING_DEPENDENCY=alsa
62662
62663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62664    cygwin_help $MISSING_DEPENDENCY
62665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62666    msys_help $MISSING_DEPENDENCY
62667  else
62668    PKGHANDLER_COMMAND=
62669
62670    case $PKGHANDLER in
62671      apt-get)
62672        apt_help     $MISSING_DEPENDENCY ;;
62673      yum)
62674        yum_help     $MISSING_DEPENDENCY ;;
62675      port)
62676        port_help    $MISSING_DEPENDENCY ;;
62677      pkgutil)
62678        pkgutil_help $MISSING_DEPENDENCY ;;
62679      pkgadd)
62680        pkgadd_help  $MISSING_DEPENDENCY ;;
62681    esac
62682
62683    if test "x$PKGHANDLER_COMMAND" != x; then
62684      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62685    fi
62686  fi
62687
62688      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62689    fi
62690  fi
62691
62692
62693
62694
62695
62696
62697# Check whether --with-libffi was given.
62698if test "${with_libffi+set}" = set; then :
62699  withval=$with_libffi;
62700fi
62701
62702
62703# Check whether --with-libffi-include was given.
62704if test "${with_libffi_include+set}" = set; then :
62705  withval=$with_libffi_include;
62706fi
62707
62708
62709# Check whether --with-libffi-lib was given.
62710if test "${with_libffi_lib+set}" = set; then :
62711  withval=$with_libffi_lib;
62712fi
62713
62714
62715  if test "x$NEEDS_LIB_FFI" = xfalse; then
62716    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62717        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62718        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62719      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62720$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62721    fi
62722    LIBFFI_CFLAGS=
62723    LIBFFI_LIBS=
62724  else
62725    LIBFFI_FOUND=no
62726
62727    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62728      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62729    fi
62730
62731    if test "x${with_libffi}" != x; then
62732      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62733      LIBFFI_CFLAGS="-I${with_libffi}/include"
62734      LIBFFI_FOUND=yes
62735    fi
62736    if test "x${with_libffi_include}" != x; then
62737      LIBFFI_CFLAGS="-I${with_libffi_include}"
62738      LIBFFI_FOUND=yes
62739    fi
62740    if test "x${with_libffi_lib}" != x; then
62741      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62742      LIBFFI_FOUND=yes
62743    fi
62744    # Do not try pkg-config if we have a sysroot set.
62745    if test "x$SYSROOT" = x; then
62746      if test "x$LIBFFI_FOUND" = xno; then
62747        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62748
62749pkg_failed=no
62750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62751$as_echo_n "checking for LIBFFI... " >&6; }
62752
62753if test -n "$LIBFFI_CFLAGS"; then
62754    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62755 elif test -n "$PKG_CONFIG"; then
62756    if test -n "$PKG_CONFIG" && \
62757    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62758  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62759  ac_status=$?
62760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62761  test $ac_status = 0; }; then
62762  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62763else
62764  pkg_failed=yes
62765fi
62766 else
62767    pkg_failed=untried
62768fi
62769if test -n "$LIBFFI_LIBS"; then
62770    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62771 elif test -n "$PKG_CONFIG"; then
62772    if test -n "$PKG_CONFIG" && \
62773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62774  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62775  ac_status=$?
62776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62777  test $ac_status = 0; }; then
62778  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62779else
62780  pkg_failed=yes
62781fi
62782 else
62783    pkg_failed=untried
62784fi
62785
62786
62787
62788if test $pkg_failed = yes; then
62789
62790if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62791        _pkg_short_errors_supported=yes
62792else
62793        _pkg_short_errors_supported=no
62794fi
62795        if test $_pkg_short_errors_supported = yes; then
62796	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62797        else
62798	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62799        fi
62800	# Put the nasty error message in config.log where it belongs
62801	echo "$LIBFFI_PKG_ERRORS" >&5
62802
62803	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62804$as_echo "no" >&6; }
62805                LIBFFI_FOUND=no
62806elif test $pkg_failed = untried; then
62807	LIBFFI_FOUND=no
62808else
62809	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62810	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62812$as_echo "yes" >&6; }
62813	LIBFFI_FOUND=yes
62814fi
62815      fi
62816    fi
62817    if test "x$LIBFFI_FOUND" = xno; then
62818      for ac_header in ffi.h
62819do :
62820  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62821if test "x$ac_cv_header_ffi_h" = xyes; then :
62822  cat >>confdefs.h <<_ACEOF
62823#define HAVE_FFI_H 1
62824_ACEOF
62825
62826            LIBFFI_FOUND=yes
62827            LIBFFI_CFLAGS=
62828            LIBFFI_LIBS=-lffi
62829
62830else
62831  LIBFFI_FOUND=no
62832
62833fi
62834
62835done
62836
62837    fi
62838    if test "x$LIBFFI_FOUND" = xno; then
62839
62840  # Print a helpful message on how to acquire the necessary build dependency.
62841  # ffi is the help tag: freetype, cups, alsa etc
62842  MISSING_DEPENDENCY=ffi
62843
62844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62845    cygwin_help $MISSING_DEPENDENCY
62846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62847    msys_help $MISSING_DEPENDENCY
62848  else
62849    PKGHANDLER_COMMAND=
62850
62851    case $PKGHANDLER in
62852      apt-get)
62853        apt_help     $MISSING_DEPENDENCY ;;
62854      yum)
62855        yum_help     $MISSING_DEPENDENCY ;;
62856      port)
62857        port_help    $MISSING_DEPENDENCY ;;
62858      pkgutil)
62859        pkgutil_help $MISSING_DEPENDENCY ;;
62860      pkgadd)
62861        pkgadd_help  $MISSING_DEPENDENCY ;;
62862    esac
62863
62864    if test "x$PKGHANDLER_COMMAND" != x; then
62865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62866    fi
62867  fi
62868
62869      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62870    fi
62871
62872    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62873$as_echo_n "checking if libffi works... " >&6; }
62874    ac_ext=c
62875ac_cpp='$CPP $CPPFLAGS'
62876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62878ac_compiler_gnu=$ac_cv_c_compiler_gnu
62879
62880    OLD_CFLAGS="$CFLAGS"
62881    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62882    OLD_LIBS="$LIBS"
62883    LIBS="$LIBS $LIBFFI_LIBS"
62884    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62885/* end confdefs.h.  */
62886#include <ffi.h>
62887int
62888main ()
62889{
62890
62891          ffi_call(NULL, NULL, NULL, NULL);
62892          return 0;
62893
62894  ;
62895  return 0;
62896}
62897_ACEOF
62898if ac_fn_c_try_link "$LINENO"; then :
62899  LIBFFI_WORKS=yes
62900else
62901  LIBFFI_WORKS=no
62902
62903fi
62904rm -f core conftest.err conftest.$ac_objext \
62905    conftest$ac_exeext conftest.$ac_ext
62906    CFLAGS="$OLD_CFLAGS"
62907    LIBS="$OLD_LIBS"
62908    ac_ext=cpp
62909ac_cpp='$CXXCPP $CPPFLAGS'
62910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62913
62914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62915$as_echo "$LIBFFI_WORKS" >&6; }
62916
62917    if test "x$LIBFFI_WORKS" = xno; then
62918
62919  # Print a helpful message on how to acquire the necessary build dependency.
62920  # ffi is the help tag: freetype, cups, alsa etc
62921  MISSING_DEPENDENCY=ffi
62922
62923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62924    cygwin_help $MISSING_DEPENDENCY
62925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62926    msys_help $MISSING_DEPENDENCY
62927  else
62928    PKGHANDLER_COMMAND=
62929
62930    case $PKGHANDLER in
62931      apt-get)
62932        apt_help     $MISSING_DEPENDENCY ;;
62933      yum)
62934        yum_help     $MISSING_DEPENDENCY ;;
62935      port)
62936        port_help    $MISSING_DEPENDENCY ;;
62937      pkgutil)
62938        pkgutil_help $MISSING_DEPENDENCY ;;
62939      pkgadd)
62940        pkgadd_help  $MISSING_DEPENDENCY ;;
62941    esac
62942
62943    if test "x$PKGHANDLER_COMMAND" != x; then
62944      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62945    fi
62946  fi
62947
62948      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
62949    fi
62950  fi
62951
62952
62953
62954
62955
62956  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
62957    # Extract the first word of "llvm-config", so it can be a program name with args.
62958set dummy llvm-config; ac_word=$2
62959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
62960$as_echo_n "checking for $ac_word... " >&6; }
62961if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
62962  $as_echo_n "(cached) " >&6
62963else
62964  if test -n "$LLVM_CONFIG"; then
62965  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
62966else
62967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
62968for as_dir in $PATH
62969do
62970  IFS=$as_save_IFS
62971  test -z "$as_dir" && as_dir=.
62972    for ac_exec_ext in '' $ac_executable_extensions; do
62973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
62974    ac_cv_prog_LLVM_CONFIG="llvm-config"
62975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
62976    break 2
62977  fi
62978done
62979  done
62980IFS=$as_save_IFS
62981
62982fi
62983fi
62984LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
62985if test -n "$LLVM_CONFIG"; then
62986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
62987$as_echo "$LLVM_CONFIG" >&6; }
62988else
62989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62990$as_echo "no" >&6; }
62991fi
62992
62993
62994
62995    if test "x$LLVM_CONFIG" != xllvm-config; then
62996      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
62997    fi
62998
62999    llvm_components="jit mcjit engine nativecodegen native"
63000    unset LLVM_CFLAGS
63001    for flag in $("$LLVM_CONFIG" --cxxflags); do
63002      if echo "${flag}" | grep -q '^-[ID]'; then
63003        if test "${flag}" != "-D_DEBUG" ; then
63004          if test "${LLVM_CFLAGS}" != "" ; then
63005            LLVM_CFLAGS="${LLVM_CFLAGS} "
63006          fi
63007          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63008        fi
63009      fi
63010    done
63011    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63012    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63013
63014    unset LLVM_LDFLAGS
63015    for flag in $("${LLVM_CONFIG}" --ldflags); do
63016      if echo "${flag}" | grep -q '^-L'; then
63017        if test "${LLVM_LDFLAGS}" != ""; then
63018          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63019        fi
63020        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63021      fi
63022    done
63023
63024    unset LLVM_LIBS
63025    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63026      if echo "${flag}" | grep -q '^-l'; then
63027        if test "${LLVM_LIBS}" != ""; then
63028          LLVM_LIBS="${LLVM_LIBS} "
63029        fi
63030        LLVM_LIBS="${LLVM_LIBS}${flag}"
63031      fi
63032    done
63033
63034    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63035    # always properly detect -ltinfo
63036    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63037
63038
63039
63040
63041  fi
63042
63043
63044
63045# Check whether --with-libjpeg was given.
63046if test "${with_libjpeg+set}" = set; then :
63047  withval=$with_libjpeg;
63048fi
63049
63050
63051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63052$as_echo_n "checking for which libjpeg to use... " >&6; }
63053  # default is bundled
63054  DEFAULT_LIBJPEG=bundled
63055  # if user didn't specify, use DEFAULT_LIBJPEG
63056  if test "x${with_libjpeg}" = "x"; then
63057    with_libjpeg=${DEFAULT_LIBJPEG}
63058  fi
63059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63060$as_echo "${with_libjpeg}" >&6; }
63061
63062  if test "x${with_libjpeg}" = "xbundled"; then
63063    USE_EXTERNAL_LIBJPEG=false
63064  elif test "x${with_libjpeg}" = "xsystem"; then
63065    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63066if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63067
63068else
63069   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63070fi
63071
63072
63073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63074$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63075if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63076  $as_echo_n "(cached) " >&6
63077else
63078  ac_check_lib_save_LIBS=$LIBS
63079LIBS="-ljpeg  $LIBS"
63080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63081/* end confdefs.h.  */
63082
63083/* Override any GCC internal prototype to avoid an error.
63084   Use char because int might match the return type of a GCC
63085   builtin and then its argument prototype would still apply.  */
63086#ifdef __cplusplus
63087extern "C"
63088#endif
63089char jpeg_CreateDecompress ();
63090int
63091main ()
63092{
63093return jpeg_CreateDecompress ();
63094  ;
63095  return 0;
63096}
63097_ACEOF
63098if ac_fn_cxx_try_link "$LINENO"; then :
63099  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63100else
63101  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63102fi
63103rm -f core conftest.err conftest.$ac_objext \
63104    conftest$ac_exeext conftest.$ac_ext
63105LIBS=$ac_check_lib_save_LIBS
63106fi
63107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63108$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63109if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63110  cat >>confdefs.h <<_ACEOF
63111#define HAVE_LIBJPEG 1
63112_ACEOF
63113
63114  LIBS="-ljpeg $LIBS"
63115
63116else
63117   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63118fi
63119
63120
63121    USE_EXTERNAL_LIBJPEG=true
63122  else
63123    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63124  fi
63125
63126
63127
63128
63129
63130# Check whether --with-giflib was given.
63131if test "${with_giflib+set}" = set; then :
63132  withval=$with_giflib;
63133fi
63134
63135
63136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63137$as_echo_n "checking for which giflib to use... " >&6; }
63138  # default is bundled
63139  DEFAULT_GIFLIB=bundled
63140  # if user didn't specify, use DEFAULT_GIFLIB
63141  if test "x${with_giflib}" = "x"; then
63142    with_giflib=${DEFAULT_GIFLIB}
63143  fi
63144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63145$as_echo "${with_giflib}" >&6; }
63146
63147  if test "x${with_giflib}" = "xbundled"; then
63148    USE_EXTERNAL_LIBGIF=false
63149  elif test "x${with_giflib}" = "xsystem"; then
63150    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63151if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63152
63153else
63154   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63155fi
63156
63157
63158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63159$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63160if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63161  $as_echo_n "(cached) " >&6
63162else
63163  ac_check_lib_save_LIBS=$LIBS
63164LIBS="-lgif  $LIBS"
63165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63166/* end confdefs.h.  */
63167
63168/* Override any GCC internal prototype to avoid an error.
63169   Use char because int might match the return type of a GCC
63170   builtin and then its argument prototype would still apply.  */
63171#ifdef __cplusplus
63172extern "C"
63173#endif
63174char DGifGetCode ();
63175int
63176main ()
63177{
63178return DGifGetCode ();
63179  ;
63180  return 0;
63181}
63182_ACEOF
63183if ac_fn_cxx_try_link "$LINENO"; then :
63184  ac_cv_lib_gif_DGifGetCode=yes
63185else
63186  ac_cv_lib_gif_DGifGetCode=no
63187fi
63188rm -f core conftest.err conftest.$ac_objext \
63189    conftest$ac_exeext conftest.$ac_ext
63190LIBS=$ac_check_lib_save_LIBS
63191fi
63192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63193$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63194if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63195  cat >>confdefs.h <<_ACEOF
63196#define HAVE_LIBGIF 1
63197_ACEOF
63198
63199  LIBS="-lgif $LIBS"
63200
63201else
63202   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63203fi
63204
63205
63206    USE_EXTERNAL_LIBGIF=true
63207  else
63208    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63209  fi
63210
63211
63212
63213
63214
63215# Check whether --with-libpng was given.
63216if test "${with_libpng+set}" = set; then :
63217  withval=$with_libpng;
63218fi
63219
63220
63221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63222$as_echo_n "checking for which libpng to use... " >&6; }
63223
63224  # default is bundled
63225  DEFAULT_LIBPNG=bundled
63226  # if user didn't specify, use DEFAULT_LIBPNG
63227  if test "x${with_libpng}" = "x"; then
63228      with_libpng=${DEFAULT_LIBPNG}
63229  fi
63230
63231  if test "x${with_libpng}" = "xbundled"; then
63232      USE_EXTERNAL_LIBPNG=false
63233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63234$as_echo "bundled" >&6; }
63235  elif test "x${with_libpng}" = "xsystem"; then
63236
63237pkg_failed=no
63238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63239$as_echo_n "checking for PNG... " >&6; }
63240
63241if test -n "$PNG_CFLAGS"; then
63242    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63243 elif test -n "$PKG_CONFIG"; then
63244    if test -n "$PKG_CONFIG" && \
63245    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63246  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63247  ac_status=$?
63248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63249  test $ac_status = 0; }; then
63250  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63251else
63252  pkg_failed=yes
63253fi
63254 else
63255    pkg_failed=untried
63256fi
63257if test -n "$PNG_LIBS"; then
63258    pkg_cv_PNG_LIBS="$PNG_LIBS"
63259 elif test -n "$PKG_CONFIG"; then
63260    if test -n "$PKG_CONFIG" && \
63261    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63262  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63263  ac_status=$?
63264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63265  test $ac_status = 0; }; then
63266  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63267else
63268  pkg_failed=yes
63269fi
63270 else
63271    pkg_failed=untried
63272fi
63273
63274
63275
63276if test $pkg_failed = yes; then
63277
63278if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63279        _pkg_short_errors_supported=yes
63280else
63281        _pkg_short_errors_supported=no
63282fi
63283        if test $_pkg_short_errors_supported = yes; then
63284	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63285        else
63286	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63287        fi
63288	# Put the nasty error message in config.log where it belongs
63289	echo "$PNG_PKG_ERRORS" >&5
63290
63291	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63292$as_echo "no" >&6; }
63293                 LIBPNG_FOUND=no
63294elif test $pkg_failed = untried; then
63295	 LIBPNG_FOUND=no
63296else
63297	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63298	PNG_LIBS=$pkg_cv_PNG_LIBS
63299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63300$as_echo "yes" >&6; }
63301	 LIBPNG_FOUND=yes
63302fi
63303      if test "x${LIBPNG_FOUND}" = "xyes"; then
63304          USE_EXTERNAL_LIBPNG=true
63305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63306$as_echo "system" >&6; }
63307      else
63308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63309$as_echo "system not found" >&6; }
63310          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63311      fi
63312  else
63313      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63314  fi
63315
63316
63317
63318
63319
63320# Check whether --with-zlib was given.
63321if test "${with_zlib+set}" = set; then :
63322  withval=$with_zlib;
63323fi
63324
63325
63326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63327$as_echo_n "checking for compress in -lz... " >&6; }
63328if ${ac_cv_lib_z_compress+:} false; then :
63329  $as_echo_n "(cached) " >&6
63330else
63331  ac_check_lib_save_LIBS=$LIBS
63332LIBS="-lz  $LIBS"
63333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63334/* end confdefs.h.  */
63335
63336/* Override any GCC internal prototype to avoid an error.
63337   Use char because int might match the return type of a GCC
63338   builtin and then its argument prototype would still apply.  */
63339#ifdef __cplusplus
63340extern "C"
63341#endif
63342char compress ();
63343int
63344main ()
63345{
63346return compress ();
63347  ;
63348  return 0;
63349}
63350_ACEOF
63351if ac_fn_cxx_try_link "$LINENO"; then :
63352  ac_cv_lib_z_compress=yes
63353else
63354  ac_cv_lib_z_compress=no
63355fi
63356rm -f core conftest.err conftest.$ac_objext \
63357    conftest$ac_exeext conftest.$ac_ext
63358LIBS=$ac_check_lib_save_LIBS
63359fi
63360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63361$as_echo "$ac_cv_lib_z_compress" >&6; }
63362if test "x$ac_cv_lib_z_compress" = xyes; then :
63363   ZLIB_FOUND=yes
63364else
63365   ZLIB_FOUND=no
63366fi
63367
63368
63369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63370$as_echo_n "checking for which zlib to use... " >&6; }
63371
63372  DEFAULT_ZLIB=system
63373  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63374    # On windows default is bundled...on others default is system
63375    DEFAULT_ZLIB=bundled
63376  fi
63377
63378  if test "x${ZLIB_FOUND}" != "xyes"; then
63379    # If we don't find any system...set default to bundled
63380    DEFAULT_ZLIB=bundled
63381  fi
63382
63383  # If user didn't specify, use DEFAULT_ZLIB
63384  if test "x${with_zlib}" = "x"; then
63385    with_zlib=${DEFAULT_ZLIB}
63386  fi
63387
63388  if test "x${with_zlib}" = "xbundled"; then
63389    USE_EXTERNAL_LIBZ=false
63390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63391$as_echo "bundled" >&6; }
63392  elif test "x${with_zlib}" = "xsystem"; then
63393    if test "x${ZLIB_FOUND}" = "xyes"; then
63394      USE_EXTERNAL_LIBZ=true
63395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63396$as_echo "system" >&6; }
63397    else
63398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63399$as_echo "system not found" >&6; }
63400      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63401    fi
63402  else
63403    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63404  fi
63405
63406
63407
63408
63409
63410# Check whether --with-lcms was given.
63411if test "${with_lcms+set}" = set; then :
63412  withval=$with_lcms;
63413fi
63414
63415
63416  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63417$as_echo_n "checking for which lcms to use... " >&6; }
63418
63419  DEFAULT_LCMS=bundled
63420  # If user didn't specify, use DEFAULT_LCMS
63421  if test "x${with_lcms}" = "x"; then
63422      with_lcms=${DEFAULT_LCMS}
63423  fi
63424
63425  if test "x${with_lcms}" = "xbundled"; then
63426    USE_EXTERNAL_LCMS=false
63427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63428$as_echo "bundled" >&6; }
63429  elif test "x${with_lcms}" = "xsystem"; then
63430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63431$as_echo "system" >&6; }
63432
63433pkg_failed=no
63434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63435$as_echo_n "checking for LCMS... " >&6; }
63436
63437if test -n "$LCMS_CFLAGS"; then
63438    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63439 elif test -n "$PKG_CONFIG"; then
63440    if test -n "$PKG_CONFIG" && \
63441    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63442  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63443  ac_status=$?
63444  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63445  test $ac_status = 0; }; then
63446  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63447else
63448  pkg_failed=yes
63449fi
63450 else
63451    pkg_failed=untried
63452fi
63453if test -n "$LCMS_LIBS"; then
63454    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63455 elif test -n "$PKG_CONFIG"; then
63456    if test -n "$PKG_CONFIG" && \
63457    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63458  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63459  ac_status=$?
63460  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63461  test $ac_status = 0; }; then
63462  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63463else
63464  pkg_failed=yes
63465fi
63466 else
63467    pkg_failed=untried
63468fi
63469
63470
63471
63472if test $pkg_failed = yes; then
63473
63474if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63475        _pkg_short_errors_supported=yes
63476else
63477        _pkg_short_errors_supported=no
63478fi
63479        if test $_pkg_short_errors_supported = yes; then
63480	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63481        else
63482	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63483        fi
63484	# Put the nasty error message in config.log where it belongs
63485	echo "$LCMS_PKG_ERRORS" >&5
63486
63487	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63488$as_echo "no" >&6; }
63489                LCMS_FOUND=no
63490elif test $pkg_failed = untried; then
63491	LCMS_FOUND=no
63492else
63493	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63494	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63496$as_echo "yes" >&6; }
63497	LCMS_FOUND=yes
63498fi
63499    if test "x${LCMS_FOUND}" = "xyes"; then
63500      USE_EXTERNAL_LCMS=true
63501    else
63502      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63503    fi
63504  else
63505    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63506  fi
63507
63508
63509
63510
63511
63512
63513
63514
63515
63516
63517
63518  # Setup libm (the maths library)
63519  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63521$as_echo_n "checking for cos in -lm... " >&6; }
63522if ${ac_cv_lib_m_cos+:} false; then :
63523  $as_echo_n "(cached) " >&6
63524else
63525  ac_check_lib_save_LIBS=$LIBS
63526LIBS="-lm  $LIBS"
63527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63528/* end confdefs.h.  */
63529
63530/* Override any GCC internal prototype to avoid an error.
63531   Use char because int might match the return type of a GCC
63532   builtin and then its argument prototype would still apply.  */
63533#ifdef __cplusplus
63534extern "C"
63535#endif
63536char cos ();
63537int
63538main ()
63539{
63540return cos ();
63541  ;
63542  return 0;
63543}
63544_ACEOF
63545if ac_fn_cxx_try_link "$LINENO"; then :
63546  ac_cv_lib_m_cos=yes
63547else
63548  ac_cv_lib_m_cos=no
63549fi
63550rm -f core conftest.err conftest.$ac_objext \
63551    conftest$ac_exeext conftest.$ac_ext
63552LIBS=$ac_check_lib_save_LIBS
63553fi
63554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63555$as_echo "$ac_cv_lib_m_cos" >&6; }
63556if test "x$ac_cv_lib_m_cos" = xyes; then :
63557  cat >>confdefs.h <<_ACEOF
63558#define HAVE_LIBM 1
63559_ACEOF
63560
63561  LIBS="-lm $LIBS"
63562
63563else
63564
63565        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63566$as_echo "$as_me: Maths library was not found" >&6;}
63567
63568fi
63569
63570    LIBM="-lm"
63571  else
63572    LIBM=""
63573  fi
63574
63575
63576  # Setup libdl (for dynamic library loading)
63577  save_LIBS="$LIBS"
63578  LIBS=""
63579  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63580$as_echo_n "checking for dlopen in -ldl... " >&6; }
63581if ${ac_cv_lib_dl_dlopen+:} false; then :
63582  $as_echo_n "(cached) " >&6
63583else
63584  ac_check_lib_save_LIBS=$LIBS
63585LIBS="-ldl  $LIBS"
63586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63587/* end confdefs.h.  */
63588
63589/* Override any GCC internal prototype to avoid an error.
63590   Use char because int might match the return type of a GCC
63591   builtin and then its argument prototype would still apply.  */
63592#ifdef __cplusplus
63593extern "C"
63594#endif
63595char dlopen ();
63596int
63597main ()
63598{
63599return dlopen ();
63600  ;
63601  return 0;
63602}
63603_ACEOF
63604if ac_fn_cxx_try_link "$LINENO"; then :
63605  ac_cv_lib_dl_dlopen=yes
63606else
63607  ac_cv_lib_dl_dlopen=no
63608fi
63609rm -f core conftest.err conftest.$ac_objext \
63610    conftest$ac_exeext conftest.$ac_ext
63611LIBS=$ac_check_lib_save_LIBS
63612fi
63613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63614$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63615if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63616  cat >>confdefs.h <<_ACEOF
63617#define HAVE_LIBDL 1
63618_ACEOF
63619
63620  LIBS="-ldl $LIBS"
63621
63622fi
63623
63624  LIBDL="$LIBS"
63625
63626  LIBS="$save_LIBS"
63627
63628  # Deprecated libraries, keep the flags for backwards compatibility
63629  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63630
63631
63632# Check whether --with-dxsdk was given.
63633if test "${with_dxsdk+set}" = set; then :
63634  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63635$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63636fi
63637
63638
63639
63640
63641# Check whether --with-dxsdk-lib was given.
63642if test "${with_dxsdk_lib+set}" = set; then :
63643  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63644$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63645fi
63646
63647
63648
63649
63650# Check whether --with-dxsdk-include was given.
63651if test "${with_dxsdk_include+set}" = set; then :
63652  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63653$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63654fi
63655
63656
63657  fi
63658
63659  # Control if libzip can use mmap. Available for purposes of overriding.
63660  LIBZIP_CAN_USE_MMAP=true
63661
63662
63663
63664  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
63665    # Find the root of the Solaris Studio installation from the compiler path
63666    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
63667    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
63668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
63669$as_echo_n "checking for libstlport.so.1... " >&6; }
63670    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
63671      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
63672      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
63673    fi
63674    if test -f "$STLPORT_LIB"; then
63675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
63676$as_echo "yes, $STLPORT_LIB" >&6; }
63677
63678  # Only process if variable expands to non-empty
63679
63680  if test "x$STLPORT_LIB" != x; then
63681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63682
63683  # Input might be given as Windows format, start by converting to
63684  # unix format.
63685  path="$STLPORT_LIB"
63686  new_path=`$CYGPATH -u "$path"`
63687
63688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63691  # "foo.exe" is OK but "foo" is an error.
63692  #
63693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63694  # It is also a way to make sure we got the proper file name for the real test later on.
63695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63696  if test "x$test_shortpath" = x; then
63697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63698$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63699    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
63700  fi
63701
63702  # Call helper function which possibly converts this using DOS-style short mode.
63703  # If so, the updated path is stored in $new_path.
63704
63705  input_path="$new_path"
63706  # Check if we need to convert this using DOS-style short mode. If the path
63707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63708  # take no chances and rewrite it.
63709  # Note: m4 eats our [], so we need to use [ and ] instead.
63710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63711  if test "x$has_forbidden_chars" != x; then
63712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63716      # Going to short mode and back again did indeed matter. Since short mode is
63717      # case insensitive, let's make it lowercase to improve readability.
63718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63719      # Now convert it back to Unix-style (cygpath)
63720      input_path=`$CYGPATH -u "$shortmode_path"`
63721      new_path="$input_path"
63722    fi
63723  fi
63724
63725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63726  if test "x$test_cygdrive_prefix" = x; then
63727    # As a simple fix, exclude /usr/bin since it's not a real path.
63728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63730      # a path prefixed by /cygdrive for fixpath to work.
63731      new_path="$CYGWIN_ROOT_PATH$input_path"
63732    fi
63733  fi
63734
63735
63736  if test "x$path" != "x$new_path"; then
63737    STLPORT_LIB="$new_path"
63738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63739$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63740  fi
63741
63742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63743
63744  path="$STLPORT_LIB"
63745  has_colon=`$ECHO $path | $GREP ^.:`
63746  new_path="$path"
63747  if test "x$has_colon" = x; then
63748    # Not in mixed or Windows style, start by that.
63749    new_path=`cmd //c echo $path`
63750  fi
63751
63752
63753  input_path="$new_path"
63754  # Check if we need to convert this using DOS-style short mode. If the path
63755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63756  # take no chances and rewrite it.
63757  # Note: m4 eats our [], so we need to use [ and ] instead.
63758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63759  if test "x$has_forbidden_chars" != x; then
63760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63762  fi
63763
63764
63765  windows_path="$new_path"
63766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63767    unix_path=`$CYGPATH -u "$windows_path"`
63768    new_path="$unix_path"
63769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63771    new_path="$unix_path"
63772  fi
63773
63774  if test "x$path" != "x$new_path"; then
63775    STLPORT_LIB="$new_path"
63776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
63777$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
63778  fi
63779
63780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63782
63783    else
63784      # We're on a unix platform. Hooray! :)
63785      path="$STLPORT_LIB"
63786      has_space=`$ECHO "$path" | $GREP " "`
63787      if test "x$has_space" != x; then
63788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
63789$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
63790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63791      fi
63792
63793      # Use eval to expand a potential ~
63794      eval path="$path"
63795      if test ! -f "$path" && test ! -d "$path"; then
63796        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
63797      fi
63798
63799      if test -d "$path"; then
63800        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
63801      else
63802        dir="`$DIRNAME "$path"`"
63803        base="`$BASENAME "$path"`"
63804        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
63805      fi
63806    fi
63807  fi
63808
63809    else
63810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
63811$as_echo "no, not found at $STLPORT_LIB" >&6; }
63812      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
63813    fi
63814
63815  fi
63816
63817
63818
63819
63820
63821
63822
63823
63824
63825
63826
63827
63828
63829
63830###############################################################################
63831#
63832# We need to do some final tweaking, when everything else is done.
63833#
63834###############################################################################
63835
63836
63837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63838$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63839
63840  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63841    ENABLE_INTREE_EC=yes
63842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63843$as_echo "yes" >&6; }
63844  else
63845    ENABLE_INTREE_EC=no
63846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63847$as_echo "no" >&6; }
63848  fi
63849
63850
63851
63852
63853  # Check whether --enable-jtreg-failure-handler was given.
63854if test "${enable_jtreg_failure_handler+set}" = set; then :
63855  enableval=$enable_jtreg_failure_handler;
63856fi
63857
63858
63859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63860$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63861
63862  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63863    if test "x$JT_HOME" = "x"; then
63864      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63865    else
63866      BUILD_FAILURE_HANDLER=true
63867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63868$as_echo "yes, forced" >&6; }
63869    fi
63870  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63871    BUILD_FAILURE_HANDLER=false
63872    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63873$as_echo "no, forced" >&6; }
63874  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63875      || test "x$enable_jtreg_failure_handler" = "x"; then
63876    if test "x$JT_HOME" = "x"; then
63877      BUILD_FAILURE_HANDLER=false
63878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63879$as_echo "no, missing jtreg" >&6; }
63880    else
63881      BUILD_FAILURE_HANDLER=true
63882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63883$as_echo "yes, jtreg present" >&6; }
63884    fi
63885  else
63886    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63887  fi
63888
63889
63890
63891
63892  # Check whether --enable-generate-classlist was given.
63893if test "${enable_generate_classlist+set}" = set; then :
63894  enableval=$enable_generate_classlist;
63895fi
63896
63897
63898  # Check if it's likely that it's possible to generate the classlist. Depending
63899  # on exact jvm configuration it could be possible anyway.
63900  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
63901    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
63902  else
63903    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
63904  fi
63905
63906  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
63907$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
63908  if test "x$enable_generate_classlist" = "xyes"; then
63909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63910$as_echo "yes, forced" >&6; }
63911    ENABLE_GENERATE_CLASSLIST="true"
63912    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
63913      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
63914$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
63915    fi
63916  elif test "x$enable_generate_classlist" = "xno"; then
63917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63918$as_echo "no, forced" >&6; }
63919    ENABLE_GENERATE_CLASSLIST="false"
63920  elif test "x$enable_generate_classlist" = "x"; then
63921    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
63922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63923$as_echo "yes" >&6; }
63924      ENABLE_GENERATE_CLASSLIST="true"
63925    else
63926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63927$as_echo "no" >&6; }
63928      ENABLE_GENERATE_CLASSLIST="false"
63929    fi
63930  else
63931    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
63932  fi
63933
63934
63935
63936
63937###############################################################################
63938#
63939# Configure parts of the build that only affect the build performance,
63940# not the result.
63941#
63942###############################################################################
63943
63944
63945  # How many cores do we have on this build system?
63946
63947# Check whether --with-num-cores was given.
63948if test "${with_num_cores+set}" = set; then :
63949  withval=$with_num_cores;
63950fi
63951
63952  if test "x$with_num_cores" = x; then
63953    # The number of cores were not specified, try to probe them.
63954
63955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63956$as_echo_n "checking for number of cores... " >&6; }
63957  NUM_CORES=1
63958  FOUND_CORES=no
63959
63960  if test -f /proc/cpuinfo; then
63961    # Looks like a Linux (or cygwin) system
63962    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63963    FOUND_CORES=yes
63964  elif test -x /usr/sbin/psrinfo; then
63965    # Looks like a Solaris system
63966    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63967    FOUND_CORES=yes
63968  elif test -x /usr/sbin/sysctl; then
63969    # Looks like a MacOSX system
63970    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63971    FOUND_CORES=yes
63972  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63973    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63974    FOUND_CORES=yes
63975  elif test -n "$NUMBER_OF_PROCESSORS"; then
63976    # On windows, look in the env
63977    NUM_CORES=$NUMBER_OF_PROCESSORS
63978    FOUND_CORES=yes
63979  fi
63980
63981  if test "x$FOUND_CORES" = xyes; then
63982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63983$as_echo "$NUM_CORES" >&6; }
63984  else
63985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63986$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63987    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63988$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63989  fi
63990
63991  else
63992    NUM_CORES=$with_num_cores
63993  fi
63994
63995
63996
63997  # How much memory do we have on this build system?
63998
63999# Check whether --with-memory-size was given.
64000if test "${with_memory_size+set}" = set; then :
64001  withval=$with_memory_size;
64002fi
64003
64004  if test "x$with_memory_size" = x; then
64005    # The memory size was not specified, try to probe it.
64006
64007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64008$as_echo_n "checking for memory size... " >&6; }
64009  # Default to 1024 MB
64010  MEMORY_SIZE=1024
64011  FOUND_MEM=no
64012
64013  if test -f /proc/meminfo; then
64014    # Looks like a Linux (or cygwin) system
64015    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64016    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64017    FOUND_MEM=yes
64018  elif test -x /usr/sbin/prtconf; then
64019    # Looks like a Solaris or AIX system
64020    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64021    FOUND_MEM=yes
64022  elif test -x /usr/sbin/sysctl; then
64023    # Looks like a MacOSX system
64024    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64025    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64026    FOUND_MEM=yes
64027  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64028    # Windows, but without cygwin
64029    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64030    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64031    FOUND_MEM=yes
64032  fi
64033
64034  if test "x$FOUND_MEM" = xyes; then
64035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64036$as_echo "$MEMORY_SIZE MB" >&6; }
64037  else
64038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64039$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64040    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64041$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64042  fi
64043
64044  else
64045    MEMORY_SIZE=$with_memory_size
64046  fi
64047
64048
64049
64050  # Provide a decent default number of parallel jobs for make depending on
64051  # number of cores, amount of memory and machine architecture.
64052
64053# Check whether --with-jobs was given.
64054if test "${with_jobs+set}" = set; then :
64055  withval=$with_jobs;
64056fi
64057
64058  if test "x$with_jobs" = x; then
64059    # Number of jobs was not specified, calculate.
64060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64061$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64062    # Approximate memory in GB.
64063    memory_gb=`expr $MEMORY_SIZE / 1024`
64064    # Pick the lowest of memory in gb and number of cores.
64065    if test "$memory_gb" -lt "$NUM_CORES"; then
64066      JOBS="$memory_gb"
64067    else
64068      JOBS="$NUM_CORES"
64069    fi
64070    if test "$JOBS" -eq "0"; then
64071      JOBS=1
64072    fi
64073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64074$as_echo "$JOBS" >&6; }
64075  else
64076    JOBS=$with_jobs
64077  fi
64078
64079
64080
64081  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64082
64083# Check whether --with-test-jobs was given.
64084if test "${with_test_jobs+set}" = set; then :
64085  withval=$with_test_jobs;
64086fi
64087
64088  if test "x$with_test_jobs" = x; then
64089      TEST_JOBS=0
64090  else
64091      TEST_JOBS=$with_test_jobs
64092  fi
64093
64094
64095
64096# Setup arguments for the boot jdk (after cores and memory have been setup)
64097
64098  ##############################################################################
64099  #
64100  # Specify jvm options for anything that is run with the Boot JDK.
64101  # Not all JVM:s accept the same arguments on the command line.
64102  #
64103
64104# Check whether --with-boot-jdk-jvmargs was given.
64105if test "${with_boot_jdk_jvmargs+set}" = set; then :
64106  withval=$with_boot_jdk_jvmargs;
64107fi
64108
64109
64110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64111$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64112
64113  # Disable special log output when a debug build is used as Boot JDK...
64114
64115  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64116  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64117  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64118  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64119  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64120  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64121    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64122    JVM_ARG_OK=true
64123  else
64124    $ECHO "Arg failed:" >&5
64125    $ECHO "$OUTPUT" >&5
64126    JVM_ARG_OK=false
64127  fi
64128
64129
64130  # Force en-US environment
64131
64132  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64133  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64134  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64135  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64136  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64138    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64139    JVM_ARG_OK=true
64140  else
64141    $ECHO "Arg failed:" >&5
64142    $ECHO "$OUTPUT" >&5
64143    JVM_ARG_OK=false
64144  fi
64145
64146
64147  # Apply user provided options.
64148
64149  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64150  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64151  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64152  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64153  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64154  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64155    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64156    JVM_ARG_OK=true
64157  else
64158    $ECHO "Arg failed:" >&5
64159    $ECHO "$OUTPUT" >&5
64160    JVM_ARG_OK=false
64161  fi
64162
64163
64164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64165$as_echo "$boot_jdk_jvmargs" >&6; }
64166
64167  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64168  JAVA_FLAGS=$boot_jdk_jvmargs
64169
64170
64171
64172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64173$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64174
64175  # Starting amount of heap memory.
64176
64177  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64178  $ECHO "Command: $JAVA -Xms64M -version" >&5
64179  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64180  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64181  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64182  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64183    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64184    JVM_ARG_OK=true
64185  else
64186    $ECHO "Arg failed:" >&5
64187    $ECHO "$OUTPUT" >&5
64188    JVM_ARG_OK=false
64189  fi
64190
64191  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64192
64193  # Maximum amount of heap memory and stack size.
64194  JVM_HEAP_LIMIT_32="1024"
64195  # Running a 64 bit JVM allows for and requires a bigger heap
64196  JVM_HEAP_LIMIT_64="1600"
64197  STACK_SIZE_32=768
64198  STACK_SIZE_64=1536
64199  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64200  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64201    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64202  fi
64203  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64204    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64205  fi
64206  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64207    JVM_HEAP_LIMIT_32=512
64208    JVM_HEAP_LIMIT_64=512
64209  fi
64210
64211  if test "x$BOOT_JDK_BITS" = "x32"; then
64212    STACK_SIZE=$STACK_SIZE_32
64213    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64214  else
64215    STACK_SIZE=$STACK_SIZE_64
64216    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64217  fi
64218
64219  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64220  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64221  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64222  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64223  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64224  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64225    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64226    JVM_ARG_OK=true
64227  else
64228    $ECHO "Arg failed:" >&5
64229    $ECHO "$OUTPUT" >&5
64230    JVM_ARG_OK=false
64231  fi
64232
64233
64234  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64235  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64236  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64237  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64238  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64239  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64240    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64241    JVM_ARG_OK=true
64242  else
64243    $ECHO "Arg failed:" >&5
64244    $ECHO "$OUTPUT" >&5
64245    JVM_ARG_OK=false
64246  fi
64247
64248
64249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64250$as_echo "$boot_jdk_jvmargs_big" >&6; }
64251
64252  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64253
64254
64255  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64256    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64257    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64258  else
64259    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64260    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64261  fi
64262  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64263  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64265$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64267$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64268
64269
64270  # By default, the main javac compilations use big
64271  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64272
64273
64274  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64275$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64276
64277  # Use serial gc for small short lived tools if possible
64278
64279  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64280  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64281  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64282  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64283  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64284  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64285    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64286    JVM_ARG_OK=true
64287  else
64288    $ECHO "Arg failed:" >&5
64289    $ECHO "$OUTPUT" >&5
64290    JVM_ARG_OK=false
64291  fi
64292
64293
64294  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64295  $ECHO "Command: $JAVA -Xms32M -version" >&5
64296  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64297  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64298  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64299  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64300    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64301    JVM_ARG_OK=true
64302  else
64303    $ECHO "Arg failed:" >&5
64304    $ECHO "$OUTPUT" >&5
64305    JVM_ARG_OK=false
64306  fi
64307
64308
64309  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64310  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64311  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64312  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64313  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64314  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64315    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64316    JVM_ARG_OK=true
64317  else
64318    $ECHO "Arg failed:" >&5
64319    $ECHO "$OUTPUT" >&5
64320    JVM_ARG_OK=false
64321  fi
64322
64323
64324  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64325  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64326  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64327  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64328  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64329  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64330    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64331    JVM_ARG_OK=true
64332  else
64333    $ECHO "Arg failed:" >&5
64334    $ECHO "$OUTPUT" >&5
64335    JVM_ARG_OK=false
64336  fi
64337
64338
64339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64340$as_echo "$boot_jdk_jvmargs_small" >&6; }
64341
64342  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64343
64344
64345  JAVA_TOOL_FLAGS_SMALL=""
64346  for f in $JAVA_FLAGS_SMALL; do
64347    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64348  done
64349
64350
64351
64352# Setup smart javac (after cores and memory have been setup)
64353
64354
64355# Check whether --with-sjavac-server-java was given.
64356if test "${with_sjavac_server_java+set}" = set; then :
64357  withval=$with_sjavac_server_java;
64358fi
64359
64360
64361  if test "x$with_sjavac_server_java" != x; then
64362    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64363    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64364    if test "x$FOUND_VERSION" = x; then
64365      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64366    fi
64367  else
64368    SJAVAC_SERVER_JAVA="$JAVA"
64369  fi
64370
64371
64372  if test "$MEMORY_SIZE" -gt "3000"; then
64373
64374  $ECHO "Check if jvm arg is ok: -d64" >&5
64375  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64376  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64377  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64378  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64379  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64380    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64381    JVM_ARG_OK=true
64382  else
64383    $ECHO "Arg failed:" >&5
64384    $ECHO "$OUTPUT" >&5
64385    JVM_ARG_OK=false
64386  fi
64387
64388    if test "$JVM_ARG_OK" = true; then
64389      JVM_64BIT=true
64390      JVM_ARG_OK=false
64391    fi
64392  fi
64393
64394  MX_VALUE=`expr $MEMORY_SIZE / 2`
64395  if test "$JVM_64BIT" = true; then
64396    # Set ms lower than mx since more than one instance of the server might
64397    # get launched at the same time before they figure out which instance won.
64398    MS_VALUE=512
64399    if test "$MX_VALUE" -gt "2048"; then
64400      MX_VALUE=2048
64401    fi
64402  else
64403    MS_VALUE=256
64404    if test "$MX_VALUE" -gt "1500"; then
64405      MX_VALUE=1500
64406    fi
64407  fi
64408  if test "$MX_VALUE" -lt "512"; then
64409    MX_VALUE=512
64410  fi
64411
64412  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64413  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64414  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64415  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64416  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64417  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64418    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64419    JVM_ARG_OK=true
64420  else
64421    $ECHO "Arg failed:" >&5
64422    $ECHO "$OUTPUT" >&5
64423    JVM_ARG_OK=false
64424  fi
64425
64426
64427
64428  # Check whether --enable-sjavac was given.
64429if test "${enable_sjavac+set}" = set; then :
64430  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64431else
64432  ENABLE_SJAVAC="no"
64433fi
64434
64435  if test "x$JVM_ARG_OK" = "xfalse"; then
64436    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64437$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64438    ENABLE_SJAVAC="no"
64439  fi
64440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64441$as_echo_n "checking whether to use sjavac... " >&6; }
64442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64443$as_echo "$ENABLE_SJAVAC" >&6; }
64444
64445
64446  # Check whether --enable-javac-server was given.
64447if test "${enable_javac_server+set}" = set; then :
64448  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64449else
64450  ENABLE_JAVAC_SERVER="yes"
64451fi
64452
64453  if test "x$JVM_ARG_OK" = "xfalse"; then
64454    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64455$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64456    ENABLE_JAVAC_SERVER="no"
64457  fi
64458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64459$as_echo_n "checking whether to use javac server... " >&6; }
64460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64461$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64462
64463
64464  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64465    # When using a server javac, the small client instances do not need much
64466    # resources.
64467    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64468  fi
64469
64470
64471# Setup use of icecc if requested
64472
64473  # Check whether --enable-icecc was given.
64474if test "${enable_icecc+set}" = set; then :
64475  enableval=$enable_icecc;
64476fi
64477
64478
64479  if test "x${enable_icecc}" = "xyes"; then
64480
64481
64482
64483  # Publish this variable in the help.
64484
64485
64486  if [ -z "${ICECC_CMD+x}" ]; then
64487    # The variable is not set by user, try to locate tool using the code snippet
64488    for ac_prog in icecc
64489do
64490  # Extract the first word of "$ac_prog", so it can be a program name with args.
64491set dummy $ac_prog; ac_word=$2
64492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64493$as_echo_n "checking for $ac_word... " >&6; }
64494if ${ac_cv_path_ICECC_CMD+:} false; then :
64495  $as_echo_n "(cached) " >&6
64496else
64497  case $ICECC_CMD in
64498  [\\/]* | ?:[\\/]*)
64499  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64500  ;;
64501  *)
64502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64503for as_dir in $PATH
64504do
64505  IFS=$as_save_IFS
64506  test -z "$as_dir" && as_dir=.
64507    for ac_exec_ext in '' $ac_executable_extensions; do
64508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64509    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64511    break 2
64512  fi
64513done
64514  done
64515IFS=$as_save_IFS
64516
64517  ;;
64518esac
64519fi
64520ICECC_CMD=$ac_cv_path_ICECC_CMD
64521if test -n "$ICECC_CMD"; then
64522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64523$as_echo "$ICECC_CMD" >&6; }
64524else
64525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64526$as_echo "no" >&6; }
64527fi
64528
64529
64530  test -n "$ICECC_CMD" && break
64531done
64532
64533  else
64534    # The variable is set, but is it from the command line or the environment?
64535
64536    # Try to remove the string !ICECC_CMD! from our list.
64537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64539      # If it failed, the variable was not from the command line. Ignore it,
64540      # but warn the user (except for BASH, which is always set by the calling BASH).
64541      if test "xICECC_CMD" != xBASH; then
64542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64543$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64544      fi
64545      # Try to locate tool using the code snippet
64546      for ac_prog in icecc
64547do
64548  # Extract the first word of "$ac_prog", so it can be a program name with args.
64549set dummy $ac_prog; ac_word=$2
64550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64551$as_echo_n "checking for $ac_word... " >&6; }
64552if ${ac_cv_path_ICECC_CMD+:} false; then :
64553  $as_echo_n "(cached) " >&6
64554else
64555  case $ICECC_CMD in
64556  [\\/]* | ?:[\\/]*)
64557  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64558  ;;
64559  *)
64560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64561for as_dir in $PATH
64562do
64563  IFS=$as_save_IFS
64564  test -z "$as_dir" && as_dir=.
64565    for ac_exec_ext in '' $ac_executable_extensions; do
64566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64567    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64569    break 2
64570  fi
64571done
64572  done
64573IFS=$as_save_IFS
64574
64575  ;;
64576esac
64577fi
64578ICECC_CMD=$ac_cv_path_ICECC_CMD
64579if test -n "$ICECC_CMD"; then
64580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64581$as_echo "$ICECC_CMD" >&6; }
64582else
64583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64584$as_echo "no" >&6; }
64585fi
64586
64587
64588  test -n "$ICECC_CMD" && break
64589done
64590
64591    else
64592      # If it succeeded, then it was overridden by the user. We will use it
64593      # for the tool.
64594
64595      # First remove it from the list of overridden variables, so we can test
64596      # for unknown variables in the end.
64597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64598
64599      # Check if we try to supply an empty value
64600      if test "x$ICECC_CMD" = x; then
64601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64602$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64604$as_echo_n "checking for ICECC_CMD... " >&6; }
64605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64606$as_echo "disabled" >&6; }
64607      else
64608        # Check if the provided tool contains a complete path.
64609        tool_specified="$ICECC_CMD"
64610        tool_basename="${tool_specified##*/}"
64611        if test "x$tool_basename" = "x$tool_specified"; then
64612          # A command without a complete path is provided, search $PATH.
64613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64614$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64615          # Extract the first word of "$tool_basename", so it can be a program name with args.
64616set dummy $tool_basename; ac_word=$2
64617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64618$as_echo_n "checking for $ac_word... " >&6; }
64619if ${ac_cv_path_ICECC_CMD+:} false; then :
64620  $as_echo_n "(cached) " >&6
64621else
64622  case $ICECC_CMD in
64623  [\\/]* | ?:[\\/]*)
64624  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64625  ;;
64626  *)
64627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64628for as_dir in $PATH
64629do
64630  IFS=$as_save_IFS
64631  test -z "$as_dir" && as_dir=.
64632    for ac_exec_ext in '' $ac_executable_extensions; do
64633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64634    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64636    break 2
64637  fi
64638done
64639  done
64640IFS=$as_save_IFS
64641
64642  ;;
64643esac
64644fi
64645ICECC_CMD=$ac_cv_path_ICECC_CMD
64646if test -n "$ICECC_CMD"; then
64647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64648$as_echo "$ICECC_CMD" >&6; }
64649else
64650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64651$as_echo "no" >&6; }
64652fi
64653
64654
64655          if test "x$ICECC_CMD" = x; then
64656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64657          fi
64658        else
64659          # Otherwise we believe it is a complete path. Use it as it is.
64660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64661$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64663$as_echo_n "checking for ICECC_CMD... " >&6; }
64664          if test ! -x "$tool_specified"; then
64665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64666$as_echo "not found" >&6; }
64667            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64668          fi
64669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64670$as_echo "$tool_specified" >&6; }
64671        fi
64672      fi
64673    fi
64674
64675  fi
64676
64677
64678
64679  if test "x$ICECC_CMD" = x; then
64680    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64681  fi
64682
64683
64684    old_path="$PATH"
64685
64686    # Look for icecc-create-env in some known places
64687    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64688
64689
64690
64691  # Publish this variable in the help.
64692
64693
64694  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64695    # The variable is not set by user, try to locate tool using the code snippet
64696    for ac_prog in icecc-create-env
64697do
64698  # Extract the first word of "$ac_prog", so it can be a program name with args.
64699set dummy $ac_prog; ac_word=$2
64700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64701$as_echo_n "checking for $ac_word... " >&6; }
64702if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64703  $as_echo_n "(cached) " >&6
64704else
64705  case $ICECC_CREATE_ENV in
64706  [\\/]* | ?:[\\/]*)
64707  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64708  ;;
64709  *)
64710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64711for as_dir in $PATH
64712do
64713  IFS=$as_save_IFS
64714  test -z "$as_dir" && as_dir=.
64715    for ac_exec_ext in '' $ac_executable_extensions; do
64716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64717    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64719    break 2
64720  fi
64721done
64722  done
64723IFS=$as_save_IFS
64724
64725  ;;
64726esac
64727fi
64728ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64729if test -n "$ICECC_CREATE_ENV"; then
64730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64731$as_echo "$ICECC_CREATE_ENV" >&6; }
64732else
64733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64734$as_echo "no" >&6; }
64735fi
64736
64737
64738  test -n "$ICECC_CREATE_ENV" && break
64739done
64740
64741  else
64742    # The variable is set, but is it from the command line or the environment?
64743
64744    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64747      # If it failed, the variable was not from the command line. Ignore it,
64748      # but warn the user (except for BASH, which is always set by the calling BASH).
64749      if test "xICECC_CREATE_ENV" != xBASH; then
64750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64751$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64752      fi
64753      # Try to locate tool using the code snippet
64754      for ac_prog in icecc-create-env
64755do
64756  # Extract the first word of "$ac_prog", so it can be a program name with args.
64757set dummy $ac_prog; ac_word=$2
64758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64759$as_echo_n "checking for $ac_word... " >&6; }
64760if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64761  $as_echo_n "(cached) " >&6
64762else
64763  case $ICECC_CREATE_ENV in
64764  [\\/]* | ?:[\\/]*)
64765  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64766  ;;
64767  *)
64768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64769for as_dir in $PATH
64770do
64771  IFS=$as_save_IFS
64772  test -z "$as_dir" && as_dir=.
64773    for ac_exec_ext in '' $ac_executable_extensions; do
64774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64775    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64777    break 2
64778  fi
64779done
64780  done
64781IFS=$as_save_IFS
64782
64783  ;;
64784esac
64785fi
64786ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64787if test -n "$ICECC_CREATE_ENV"; then
64788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64789$as_echo "$ICECC_CREATE_ENV" >&6; }
64790else
64791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64792$as_echo "no" >&6; }
64793fi
64794
64795
64796  test -n "$ICECC_CREATE_ENV" && break
64797done
64798
64799    else
64800      # If it succeeded, then it was overridden by the user. We will use it
64801      # for the tool.
64802
64803      # First remove it from the list of overridden variables, so we can test
64804      # for unknown variables in the end.
64805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64806
64807      # Check if we try to supply an empty value
64808      if test "x$ICECC_CREATE_ENV" = x; then
64809        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64810$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64812$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64814$as_echo "disabled" >&6; }
64815      else
64816        # Check if the provided tool contains a complete path.
64817        tool_specified="$ICECC_CREATE_ENV"
64818        tool_basename="${tool_specified##*/}"
64819        if test "x$tool_basename" = "x$tool_specified"; then
64820          # A command without a complete path is provided, search $PATH.
64821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64822$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64823          # Extract the first word of "$tool_basename", so it can be a program name with args.
64824set dummy $tool_basename; ac_word=$2
64825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64826$as_echo_n "checking for $ac_word... " >&6; }
64827if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64828  $as_echo_n "(cached) " >&6
64829else
64830  case $ICECC_CREATE_ENV in
64831  [\\/]* | ?:[\\/]*)
64832  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64833  ;;
64834  *)
64835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64836for as_dir in $PATH
64837do
64838  IFS=$as_save_IFS
64839  test -z "$as_dir" && as_dir=.
64840    for ac_exec_ext in '' $ac_executable_extensions; do
64841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64842    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64844    break 2
64845  fi
64846done
64847  done
64848IFS=$as_save_IFS
64849
64850  ;;
64851esac
64852fi
64853ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64854if test -n "$ICECC_CREATE_ENV"; then
64855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64856$as_echo "$ICECC_CREATE_ENV" >&6; }
64857else
64858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64859$as_echo "no" >&6; }
64860fi
64861
64862
64863          if test "x$ICECC_CREATE_ENV" = x; then
64864            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64865          fi
64866        else
64867          # Otherwise we believe it is a complete path. Use it as it is.
64868          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64869$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64870          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64871$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64872          if test ! -x "$tool_specified"; then
64873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64874$as_echo "not found" >&6; }
64875            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64876          fi
64877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64878$as_echo "$tool_specified" >&6; }
64879        fi
64880      fi
64881    fi
64882
64883  fi
64884
64885
64886
64887  if test "x$ICECC_CREATE_ENV" = x; then
64888    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64889  fi
64890
64891
64892    # Use icecc-create-env to create a minimal compilation environment that can
64893    # be sent to the other hosts in the icecream cluster.
64894    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64895    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64896    # Older versions of icecc does not have the --gcc parameter
64897    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64898      icecc_gcc_arg="--gcc"
64899    fi
64900    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64901
64902  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64903      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64904          ${icecc_create_env_log} 2>&1 )
64905  if test "$?" != "0"; then
64906    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64907$as_echo "$as_me: icecc-create-env output:" >&6;}
64908    cat \
64909          ${icecc_create_env_log}
64910    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64911  fi
64912
64913    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64914      # For clang, the icecc compilerwrapper is needed. It usually resides next
64915      # to icecc-create-env.
64916
64917
64918
64919  # Publish this variable in the help.
64920
64921
64922  if [ -z "${ICECC_WRAPPER+x}" ]; then
64923    # The variable is not set by user, try to locate tool using the code snippet
64924    for ac_prog in compilerwrapper
64925do
64926  # Extract the first word of "$ac_prog", so it can be a program name with args.
64927set dummy $ac_prog; ac_word=$2
64928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64929$as_echo_n "checking for $ac_word... " >&6; }
64930if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64931  $as_echo_n "(cached) " >&6
64932else
64933  case $ICECC_WRAPPER in
64934  [\\/]* | ?:[\\/]*)
64935  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64936  ;;
64937  *)
64938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64939for as_dir in $PATH
64940do
64941  IFS=$as_save_IFS
64942  test -z "$as_dir" && as_dir=.
64943    for ac_exec_ext in '' $ac_executable_extensions; do
64944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64945    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64947    break 2
64948  fi
64949done
64950  done
64951IFS=$as_save_IFS
64952
64953  ;;
64954esac
64955fi
64956ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64957if test -n "$ICECC_WRAPPER"; then
64958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64959$as_echo "$ICECC_WRAPPER" >&6; }
64960else
64961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64962$as_echo "no" >&6; }
64963fi
64964
64965
64966  test -n "$ICECC_WRAPPER" && break
64967done
64968
64969  else
64970    # The variable is set, but is it from the command line or the environment?
64971
64972    # Try to remove the string !ICECC_WRAPPER! from our list.
64973    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64974    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64975      # If it failed, the variable was not from the command line. Ignore it,
64976      # but warn the user (except for BASH, which is always set by the calling BASH).
64977      if test "xICECC_WRAPPER" != xBASH; then
64978        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64979$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64980      fi
64981      # Try to locate tool using the code snippet
64982      for ac_prog in compilerwrapper
64983do
64984  # Extract the first word of "$ac_prog", so it can be a program name with args.
64985set dummy $ac_prog; ac_word=$2
64986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64987$as_echo_n "checking for $ac_word... " >&6; }
64988if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64989  $as_echo_n "(cached) " >&6
64990else
64991  case $ICECC_WRAPPER in
64992  [\\/]* | ?:[\\/]*)
64993  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64994  ;;
64995  *)
64996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64997for as_dir in $PATH
64998do
64999  IFS=$as_save_IFS
65000  test -z "$as_dir" && as_dir=.
65001    for ac_exec_ext in '' $ac_executable_extensions; do
65002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65003    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65005    break 2
65006  fi
65007done
65008  done
65009IFS=$as_save_IFS
65010
65011  ;;
65012esac
65013fi
65014ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65015if test -n "$ICECC_WRAPPER"; then
65016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65017$as_echo "$ICECC_WRAPPER" >&6; }
65018else
65019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65020$as_echo "no" >&6; }
65021fi
65022
65023
65024  test -n "$ICECC_WRAPPER" && break
65025done
65026
65027    else
65028      # If it succeeded, then it was overridden by the user. We will use it
65029      # for the tool.
65030
65031      # First remove it from the list of overridden variables, so we can test
65032      # for unknown variables in the end.
65033      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65034
65035      # Check if we try to supply an empty value
65036      if test "x$ICECC_WRAPPER" = x; then
65037        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65038$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65039        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65040$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65042$as_echo "disabled" >&6; }
65043      else
65044        # Check if the provided tool contains a complete path.
65045        tool_specified="$ICECC_WRAPPER"
65046        tool_basename="${tool_specified##*/}"
65047        if test "x$tool_basename" = "x$tool_specified"; then
65048          # A command without a complete path is provided, search $PATH.
65049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65050$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65051          # Extract the first word of "$tool_basename", so it can be a program name with args.
65052set dummy $tool_basename; ac_word=$2
65053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65054$as_echo_n "checking for $ac_word... " >&6; }
65055if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65056  $as_echo_n "(cached) " >&6
65057else
65058  case $ICECC_WRAPPER in
65059  [\\/]* | ?:[\\/]*)
65060  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65061  ;;
65062  *)
65063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65064for as_dir in $PATH
65065do
65066  IFS=$as_save_IFS
65067  test -z "$as_dir" && as_dir=.
65068    for ac_exec_ext in '' $ac_executable_extensions; do
65069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65070    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65072    break 2
65073  fi
65074done
65075  done
65076IFS=$as_save_IFS
65077
65078  ;;
65079esac
65080fi
65081ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65082if test -n "$ICECC_WRAPPER"; then
65083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65084$as_echo "$ICECC_WRAPPER" >&6; }
65085else
65086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65087$as_echo "no" >&6; }
65088fi
65089
65090
65091          if test "x$ICECC_WRAPPER" = x; then
65092            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65093          fi
65094        else
65095          # Otherwise we believe it is a complete path. Use it as it is.
65096          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65097$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65098          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65099$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65100          if test ! -x "$tool_specified"; then
65101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65102$as_echo "not found" >&6; }
65103            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65104          fi
65105          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65106$as_echo "$tool_specified" >&6; }
65107        fi
65108      fi
65109    fi
65110
65111  fi
65112
65113
65114
65115  if test "x$ICECC_WRAPPER" = x; then
65116    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65117  fi
65118
65119
65120
65121  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65122      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65123  if test "$?" != "0"; then
65124    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65125$as_echo "$as_me: icecc-create-env output:" >&6;}
65126    cat ${icecc_create_env_log}
65127    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65128  fi
65129
65130    else
65131      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65132    fi
65133    PATH="$old_path"
65134    # The bundle with the compiler gets a name based on checksums. Parse log file
65135    # to find it.
65136    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65137    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65138    if test ! -f ${ICECC_ENV_BUNDLE}; then
65139      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65140    fi
65141    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65142$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65144$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65145    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65146
65147    if test "x${COMPILE_TYPE}" = "xcross"; then
65148      # If cross compiling, create a separate env package for the build compiler
65149      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65150      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65151      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65152
65153  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65154      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65155            ${icecc_create_env_log_build} 2>&1 )
65156  if test "$?" != "0"; then
65157    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65158$as_echo "$as_me: icecc-create-env output:" >&6;}
65159    cat \
65160            ${icecc_create_env_log_build}
65161    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65162  fi
65163
65164      elif test "x${BUILD_CC##*/}" = "xclang"; then
65165
65166  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65167      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65168  if test "$?" != "0"; then
65169    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65170$as_echo "$as_me: icecc-create-env output:" >&6;}
65171    cat ${icecc_create_env_log_build}
65172    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65173  fi
65174
65175      else
65176        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65177      fi
65178      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65179      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65180      if test ! -f ${ICECC_ENV_BUNDLE}; then
65181        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65182      fi
65183      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65184$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65185      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65186$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65187      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65188          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65189    else
65190      BUILD_ICECC="${ICECC}"
65191    fi
65192
65193
65194  fi
65195
65196
65197# Can the C/C++ compiler use precompiled headers?
65198
65199
65200  ###############################################################################
65201  #
65202  # Can the C/C++ compiler use precompiled headers?
65203  #
65204  # Check whether --enable-precompiled-headers was given.
65205if test "${enable_precompiled_headers+set}" = set; then :
65206  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65207else
65208  ENABLE_PRECOMPH=yes
65209fi
65210
65211
65212  USE_PRECOMPILED_HEADER=1
65213  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65214$as_echo_n "checking If precompiled header is enabled... " >&6; }
65215  if test "x$ENABLE_PRECOMPH" = xno; then
65216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65217$as_echo "no, forced" >&6; }
65218    USE_PRECOMPILED_HEADER=0
65219  elif test "x$ICECC" != "x"; then
65220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65221$as_echo "no, does not work effectively with icecc" >&6; }
65222    USE_PRECOMPILED_HEADER=0
65223  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65225$as_echo "no, does not work with Solaris Studio" >&6; }
65226    USE_PRECOMPILED_HEADER=0
65227  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65229$as_echo "no, does not work with xlc" >&6; }
65230    USE_PRECOMPILED_HEADER=0
65231  else
65232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65233$as_echo "yes" >&6; }
65234  fi
65235
65236  if test "x$ENABLE_PRECOMPH" = xyes; then
65237    # Check that the compiler actually supports precomp headers.
65238    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65240$as_echo_n "checking that precompiled headers work... " >&6; }
65241      echo "int alfa();" > conftest.h
65242      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65243      if test ! -f conftest.hpp.gch; then
65244        USE_PRECOMPILED_HEADER=0
65245        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65246$as_echo "no" >&6; }
65247      else
65248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65249$as_echo "yes" >&6; }
65250      fi
65251      $RM conftest.h conftest.hpp.gch
65252    fi
65253  fi
65254
65255
65256
65257
65258# Setup use of ccache, if available
65259
65260  # Check whether --enable-ccache was given.
65261if test "${enable_ccache+set}" = set; then :
65262  enableval=$enable_ccache;
65263fi
65264
65265
65266  CCACHE_STATUS=
65267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65268$as_echo_n "checking is ccache enabled... " >&6; }
65269  if test "x$enable_ccache" = xyes; then
65270    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65272$as_echo "yes" >&6; }
65273      OLD_PATH="$PATH"
65274      if test "x$TOOLCHAIN_PATH" != x; then
65275        PATH=$TOOLCHAIN_PATH:$PATH
65276      fi
65277
65278
65279
65280  # Publish this variable in the help.
65281
65282
65283  if [ -z "${CCACHE+x}" ]; then
65284    # The variable is not set by user, try to locate tool using the code snippet
65285    for ac_prog in ccache
65286do
65287  # Extract the first word of "$ac_prog", so it can be a program name with args.
65288set dummy $ac_prog; ac_word=$2
65289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65290$as_echo_n "checking for $ac_word... " >&6; }
65291if ${ac_cv_path_CCACHE+:} false; then :
65292  $as_echo_n "(cached) " >&6
65293else
65294  case $CCACHE in
65295  [\\/]* | ?:[\\/]*)
65296  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65297  ;;
65298  *)
65299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65300for as_dir in $PATH
65301do
65302  IFS=$as_save_IFS
65303  test -z "$as_dir" && as_dir=.
65304    for ac_exec_ext in '' $ac_executable_extensions; do
65305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65306    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65308    break 2
65309  fi
65310done
65311  done
65312IFS=$as_save_IFS
65313
65314  ;;
65315esac
65316fi
65317CCACHE=$ac_cv_path_CCACHE
65318if test -n "$CCACHE"; then
65319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65320$as_echo "$CCACHE" >&6; }
65321else
65322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65323$as_echo "no" >&6; }
65324fi
65325
65326
65327  test -n "$CCACHE" && break
65328done
65329
65330  else
65331    # The variable is set, but is it from the command line or the environment?
65332
65333    # Try to remove the string !CCACHE! from our list.
65334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65336      # If it failed, the variable was not from the command line. Ignore it,
65337      # but warn the user (except for BASH, which is always set by the calling BASH).
65338      if test "xCCACHE" != xBASH; then
65339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65340$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65341      fi
65342      # Try to locate tool using the code snippet
65343      for ac_prog in ccache
65344do
65345  # Extract the first word of "$ac_prog", so it can be a program name with args.
65346set dummy $ac_prog; ac_word=$2
65347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65348$as_echo_n "checking for $ac_word... " >&6; }
65349if ${ac_cv_path_CCACHE+:} false; then :
65350  $as_echo_n "(cached) " >&6
65351else
65352  case $CCACHE in
65353  [\\/]* | ?:[\\/]*)
65354  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65355  ;;
65356  *)
65357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65358for as_dir in $PATH
65359do
65360  IFS=$as_save_IFS
65361  test -z "$as_dir" && as_dir=.
65362    for ac_exec_ext in '' $ac_executable_extensions; do
65363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65364    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65366    break 2
65367  fi
65368done
65369  done
65370IFS=$as_save_IFS
65371
65372  ;;
65373esac
65374fi
65375CCACHE=$ac_cv_path_CCACHE
65376if test -n "$CCACHE"; then
65377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65378$as_echo "$CCACHE" >&6; }
65379else
65380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65381$as_echo "no" >&6; }
65382fi
65383
65384
65385  test -n "$CCACHE" && break
65386done
65387
65388    else
65389      # If it succeeded, then it was overridden by the user. We will use it
65390      # for the tool.
65391
65392      # First remove it from the list of overridden variables, so we can test
65393      # for unknown variables in the end.
65394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65395
65396      # Check if we try to supply an empty value
65397      if test "x$CCACHE" = x; then
65398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65399$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65401$as_echo_n "checking for CCACHE... " >&6; }
65402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65403$as_echo "disabled" >&6; }
65404      else
65405        # Check if the provided tool contains a complete path.
65406        tool_specified="$CCACHE"
65407        tool_basename="${tool_specified##*/}"
65408        if test "x$tool_basename" = "x$tool_specified"; then
65409          # A command without a complete path is provided, search $PATH.
65410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65411$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65412          # Extract the first word of "$tool_basename", so it can be a program name with args.
65413set dummy $tool_basename; ac_word=$2
65414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65415$as_echo_n "checking for $ac_word... " >&6; }
65416if ${ac_cv_path_CCACHE+:} false; then :
65417  $as_echo_n "(cached) " >&6
65418else
65419  case $CCACHE in
65420  [\\/]* | ?:[\\/]*)
65421  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65422  ;;
65423  *)
65424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65425for as_dir in $PATH
65426do
65427  IFS=$as_save_IFS
65428  test -z "$as_dir" && as_dir=.
65429    for ac_exec_ext in '' $ac_executable_extensions; do
65430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65431    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65433    break 2
65434  fi
65435done
65436  done
65437IFS=$as_save_IFS
65438
65439  ;;
65440esac
65441fi
65442CCACHE=$ac_cv_path_CCACHE
65443if test -n "$CCACHE"; then
65444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65445$as_echo "$CCACHE" >&6; }
65446else
65447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65448$as_echo "no" >&6; }
65449fi
65450
65451
65452          if test "x$CCACHE" = x; then
65453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65454          fi
65455        else
65456          # Otherwise we believe it is a complete path. Use it as it is.
65457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65458$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65460$as_echo_n "checking for CCACHE... " >&6; }
65461          if test ! -x "$tool_specified"; then
65462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65463$as_echo "not found" >&6; }
65464            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65465          fi
65466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65467$as_echo "$tool_specified" >&6; }
65468        fi
65469      fi
65470    fi
65471
65472  fi
65473
65474
65475
65476  if test "x$CCACHE" = x; then
65477    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65478  fi
65479
65480
65481      PATH="$OLD_PATH"
65482      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65483      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65484    else
65485      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65486$as_echo "no" >&6; }
65487      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65488$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65489    fi
65490  elif test "x$enable_ccache" = xno; then
65491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65492$as_echo "no, explicitly disabled" >&6; }
65493    CCACHE_STATUS="Disabled"
65494  elif test "x$enable_ccache" = x; then
65495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65496$as_echo "no" >&6; }
65497  else
65498    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65499$as_echo "unknown" >&6; }
65500    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65501  fi
65502
65503
65504
65505# Check whether --with-ccache-dir was given.
65506if test "${with_ccache_dir+set}" = set; then :
65507  withval=$with_ccache_dir;
65508fi
65509
65510
65511  if test "x$with_ccache_dir" != x; then
65512    # When using a non home ccache directory, assume the use is to share ccache files
65513    # with other users. Thus change the umask.
65514    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65515    if test "x$CCACHE" = x; then
65516      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65517$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65518    fi
65519  fi
65520
65521  if test "x$CCACHE" != x; then
65522
65523  if test "x$CCACHE" != x; then
65524    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65525      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65526          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65527      if test "x$HAS_BAD_CCACHE" != "x"; then
65528        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65529      fi
65530      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65531$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65532      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65533      PUSHED_FLAGS="$CXXFLAGS"
65534      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65535      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65536/* end confdefs.h.  */
65537
65538int
65539main ()
65540{
65541
65542  ;
65543  return 0;
65544}
65545_ACEOF
65546if ac_fn_cxx_try_compile "$LINENO"; then :
65547  CC_KNOWS_CCACHE_TRICK=yes
65548else
65549  CC_KNOWS_CCACHE_TRICK=no
65550fi
65551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65552      CXXFLAGS="$PUSHED_FLAGS"
65553      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65555$as_echo "yes" >&6; }
65556        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65557
65558        CCACHE_SLOPPINESS=pch_defines,time_macros
65559      else
65560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65561$as_echo "no" >&6; }
65562        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65563      fi
65564    fi
65565
65566    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65567        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65568
65569    if test "x$SET_CCACHE_DIR" != x; then
65570      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65571      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65572    fi
65573  fi
65574
65575  fi
65576
65577
65578###############################################################################
65579#
65580# And now the finish...
65581#
65582###############################################################################
65583
65584# Check for some common pitfalls
65585
65586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65587    file_to_test="$SRC_ROOT/LICENSE"
65588    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65589      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
65590    fi
65591  fi
65592
65593
65594  # Did user specify any unknown variables?
65595
65596  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65597    # Replace the separating ! with spaces before presenting for end user.
65598    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65599    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65600$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65601  fi
65602
65603
65604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65605$as_echo_n "checking if build directory is on local disk... " >&6; }
65606
65607  # df -l lists only local disks; if the given directory is not found then
65608  # a non-zero exit code is given
65609  if test "x$DF" = x; then
65610    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65611      # msys does not have df; use Windows "net use" instead.
65612      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65613      if test "x$IS_NETWORK_DISK" = x; then
65614        OUTPUT_DIR_IS_LOCAL="yes"
65615      else
65616        OUTPUT_DIR_IS_LOCAL="no"
65617      fi
65618    else
65619      # No df here, say it's local
65620      OUTPUT_DIR_IS_LOCAL="yes"
65621    fi
65622  else
65623    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65624      OUTPUT_DIR_IS_LOCAL="yes"
65625    else
65626      OUTPUT_DIR_IS_LOCAL="no"
65627    fi
65628  fi
65629
65630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65631$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65632
65633
65634
65635  # Check if the user has any old-style ALT_ variables set.
65636  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65637
65638  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65639  # Since we can't properly handle the dependencies for this, warn the user about the situation
65640  if test -e $OUTPUT_ROOT/spec.gmk; then
65641    IS_RECONFIGURE=yes
65642  else
65643    IS_RECONFIGURE=no
65644  fi
65645
65646
65647# At the end, call the custom hook. (Dummy macro if no custom sources available)
65648
65649
65650# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65651
65652  # Keep feature lists sorted and free of duplicates
65653  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65654  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65655  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65656  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65657  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65658  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65659  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65660
65661  # Validate features
65662  for variant in $JVM_VARIANTS; do
65663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65664$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65665    features_var_name=JVM_FEATURES_$variant
65666    JVM_FEATURES_TO_TEST=${!features_var_name}
65667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65668$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65669    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
65670    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
65671    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
65672    if test "x$INVALID_FEATURES" != x; then
65673      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65674    fi
65675  done
65676
65677
65678# We're messing a bit with internal autoconf variables to put the config.status
65679# in the output directory instead of the current directory.
65680CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65681
65682# Create the actual output files. Now the main work of configure is done.
65683cat >confcache <<\_ACEOF
65684# This file is a shell script that caches the results of configure
65685# tests run on this system so they can be shared between configure
65686# scripts and configure runs, see configure's option --config-cache.
65687# It is not useful on other systems.  If it contains results you don't
65688# want to keep, you may remove or edit it.
65689#
65690# config.status only pays attention to the cache file if you give it
65691# the --recheck option to rerun configure.
65692#
65693# `ac_cv_env_foo' variables (set or unset) will be overridden when
65694# loading this file, other *unset* `ac_cv_foo' will be assigned the
65695# following values.
65696
65697_ACEOF
65698
65699# The following way of writing the cache mishandles newlines in values,
65700# but we know of no workaround that is simple, portable, and efficient.
65701# So, we kill variables containing newlines.
65702# Ultrix sh set writes to stderr and can't be redirected directly,
65703# and sets the high bit in the cache file unless we assign to the vars.
65704(
65705  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65706    eval ac_val=\$$ac_var
65707    case $ac_val in #(
65708    *${as_nl}*)
65709      case $ac_var in #(
65710      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65711$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65712      esac
65713      case $ac_var in #(
65714      _ | IFS | as_nl) ;; #(
65715      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65716      *) { eval $ac_var=; unset $ac_var;} ;;
65717      esac ;;
65718    esac
65719  done
65720
65721  (set) 2>&1 |
65722    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65723    *${as_nl}ac_space=\ *)
65724      # `set' does not quote correctly, so add quotes: double-quote
65725      # substitution turns \\\\ into \\, and sed turns \\ into \.
65726      sed -n \
65727	"s/'/'\\\\''/g;
65728	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65729      ;; #(
65730    *)
65731      # `set' quotes correctly as required by POSIX, so do not add quotes.
65732      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65733      ;;
65734    esac |
65735    sort
65736) |
65737  sed '
65738     /^ac_cv_env_/b end
65739     t clear
65740     :clear
65741     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65742     t end
65743     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65744     :end' >>confcache
65745if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65746  if test -w "$cache_file"; then
65747    if test "x$cache_file" != "x/dev/null"; then
65748      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65749$as_echo "$as_me: updating cache $cache_file" >&6;}
65750      if test ! -f "$cache_file" || test -h "$cache_file"; then
65751	cat confcache >"$cache_file"
65752      else
65753        case $cache_file in #(
65754        */* | ?:*)
65755	  mv -f confcache "$cache_file"$$ &&
65756	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65757        *)
65758	  mv -f confcache "$cache_file" ;;
65759	esac
65760      fi
65761    fi
65762  else
65763    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65764$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65765  fi
65766fi
65767rm -f confcache
65768
65769test "x$prefix" = xNONE && prefix=$ac_default_prefix
65770# Let make expand exec_prefix.
65771test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65772
65773# Transform confdefs.h into DEFS.
65774# Protect against shell expansion while executing Makefile rules.
65775# Protect against Makefile macro expansion.
65776#
65777# If the first sed substitution is executed (which looks for macros that
65778# take arguments), then branch to the quote section.  Otherwise,
65779# look for a macro that doesn't take arguments.
65780ac_script='
65781:mline
65782/\\$/{
65783 N
65784 s,\\\n,,
65785 b mline
65786}
65787t clear
65788:clear
65789s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65790t quote
65791s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65792t quote
65793b any
65794:quote
65795s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65796s/\[/\\&/g
65797s/\]/\\&/g
65798s/\$/$$/g
65799H
65800:any
65801${
65802	g
65803	s/^\n//
65804	s/\n/ /g
65805	p
65806}
65807'
65808DEFS=`sed -n "$ac_script" confdefs.h`
65809
65810
65811ac_libobjs=
65812ac_ltlibobjs=
65813U=
65814for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65815  # 1. Remove the extension, and $U if already installed.
65816  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65817  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65818  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65819  #    will be set to the directory where LIBOBJS objects are built.
65820  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65821  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65822done
65823LIBOBJS=$ac_libobjs
65824
65825LTLIBOBJS=$ac_ltlibobjs
65826
65827
65828
65829: "${CONFIG_STATUS=./config.status}"
65830ac_write_fail=0
65831ac_clean_files_save=$ac_clean_files
65832ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65833{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65834$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65835as_write_fail=0
65836cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65837#! $SHELL
65838# Generated by $as_me.
65839# Run this file to recreate the current configuration.
65840# Compiler output produced by configure, useful for debugging
65841# configure, is in config.log if it exists.
65842
65843debug=false
65844ac_cs_recheck=false
65845ac_cs_silent=false
65846
65847SHELL=\${CONFIG_SHELL-$SHELL}
65848export SHELL
65849_ASEOF
65850cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65851## -------------------- ##
65852## M4sh Initialization. ##
65853## -------------------- ##
65854
65855# Be more Bourne compatible
65856DUALCASE=1; export DUALCASE # for MKS sh
65857if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65858  emulate sh
65859  NULLCMD=:
65860  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65861  # is contrary to our usage.  Disable this feature.
65862  alias -g '${1+"$@"}'='"$@"'
65863  setopt NO_GLOB_SUBST
65864else
65865  case `(set -o) 2>/dev/null` in #(
65866  *posix*) :
65867    set -o posix ;; #(
65868  *) :
65869     ;;
65870esac
65871fi
65872
65873
65874as_nl='
65875'
65876export as_nl
65877# Printing a long string crashes Solaris 7 /usr/bin/printf.
65878as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65879as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65880as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65881# Prefer a ksh shell builtin over an external printf program on Solaris,
65882# but without wasting forks for bash or zsh.
65883if test -z "$BASH_VERSION$ZSH_VERSION" \
65884    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65885  as_echo='print -r --'
65886  as_echo_n='print -rn --'
65887elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65888  as_echo='printf %s\n'
65889  as_echo_n='printf %s'
65890else
65891  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65892    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65893    as_echo_n='/usr/ucb/echo -n'
65894  else
65895    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65896    as_echo_n_body='eval
65897      arg=$1;
65898      case $arg in #(
65899      *"$as_nl"*)
65900	expr "X$arg" : "X\\(.*\\)$as_nl";
65901	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65902      esac;
65903      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65904    '
65905    export as_echo_n_body
65906    as_echo_n='sh -c $as_echo_n_body as_echo'
65907  fi
65908  export as_echo_body
65909  as_echo='sh -c $as_echo_body as_echo'
65910fi
65911
65912# The user is always right.
65913if test "${PATH_SEPARATOR+set}" != set; then
65914  PATH_SEPARATOR=:
65915  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65916    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65917      PATH_SEPARATOR=';'
65918  }
65919fi
65920
65921
65922# IFS
65923# We need space, tab and new line, in precisely that order.  Quoting is
65924# there to prevent editors from complaining about space-tab.
65925# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65926# splitting by setting IFS to empty value.)
65927IFS=" ""	$as_nl"
65928
65929# Find who we are.  Look in the path if we contain no directory separator.
65930as_myself=
65931case $0 in #((
65932  *[\\/]* ) as_myself=$0 ;;
65933  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65934for as_dir in $PATH
65935do
65936  IFS=$as_save_IFS
65937  test -z "$as_dir" && as_dir=.
65938    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65939  done
65940IFS=$as_save_IFS
65941
65942     ;;
65943esac
65944# We did not find ourselves, most probably we were run as `sh COMMAND'
65945# in which case we are not to be found in the path.
65946if test "x$as_myself" = x; then
65947  as_myself=$0
65948fi
65949if test ! -f "$as_myself"; then
65950  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65951  exit 1
65952fi
65953
65954# Unset variables that we do not need and which cause bugs (e.g. in
65955# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65956# suppresses any "Segmentation fault" message there.  '((' could
65957# trigger a bug in pdksh 5.2.14.
65958for as_var in BASH_ENV ENV MAIL MAILPATH
65959do eval test x\${$as_var+set} = xset \
65960  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65961done
65962PS1='$ '
65963PS2='> '
65964PS4='+ '
65965
65966# NLS nuisances.
65967LC_ALL=C
65968export LC_ALL
65969LANGUAGE=C
65970export LANGUAGE
65971
65972# CDPATH.
65973(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65974
65975
65976# as_fn_error STATUS ERROR [LINENO LOG_FD]
65977# ----------------------------------------
65978# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65979# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65980# script with STATUS, using 1 if that was 0.
65981as_fn_error ()
65982{
65983  as_status=$1; test $as_status -eq 0 && as_status=1
65984  if test "$4"; then
65985    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65986    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65987  fi
65988  $as_echo "$as_me: error: $2" >&2
65989  as_fn_exit $as_status
65990} # as_fn_error
65991
65992
65993# as_fn_set_status STATUS
65994# -----------------------
65995# Set $? to STATUS, without forking.
65996as_fn_set_status ()
65997{
65998  return $1
65999} # as_fn_set_status
66000
66001# as_fn_exit STATUS
66002# -----------------
66003# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66004as_fn_exit ()
66005{
66006  set +e
66007  as_fn_set_status $1
66008  exit $1
66009} # as_fn_exit
66010
66011# as_fn_unset VAR
66012# ---------------
66013# Portably unset VAR.
66014as_fn_unset ()
66015{
66016  { eval $1=; unset $1;}
66017}
66018as_unset=as_fn_unset
66019# as_fn_append VAR VALUE
66020# ----------------------
66021# Append the text in VALUE to the end of the definition contained in VAR. Take
66022# advantage of any shell optimizations that allow amortized linear growth over
66023# repeated appends, instead of the typical quadratic growth present in naive
66024# implementations.
66025if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66026  eval 'as_fn_append ()
66027  {
66028    eval $1+=\$2
66029  }'
66030else
66031  as_fn_append ()
66032  {
66033    eval $1=\$$1\$2
66034  }
66035fi # as_fn_append
66036
66037# as_fn_arith ARG...
66038# ------------------
66039# Perform arithmetic evaluation on the ARGs, and store the result in the
66040# global $as_val. Take advantage of shells that can avoid forks. The arguments
66041# must be portable across $(()) and expr.
66042if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66043  eval 'as_fn_arith ()
66044  {
66045    as_val=$(( $* ))
66046  }'
66047else
66048  as_fn_arith ()
66049  {
66050    as_val=`expr "$@" || test $? -eq 1`
66051  }
66052fi # as_fn_arith
66053
66054
66055if expr a : '\(a\)' >/dev/null 2>&1 &&
66056   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66057  as_expr=expr
66058else
66059  as_expr=false
66060fi
66061
66062if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66063  as_basename=basename
66064else
66065  as_basename=false
66066fi
66067
66068if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66069  as_dirname=dirname
66070else
66071  as_dirname=false
66072fi
66073
66074as_me=`$as_basename -- "$0" ||
66075$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66076	 X"$0" : 'X\(//\)$' \| \
66077	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66078$as_echo X/"$0" |
66079    sed '/^.*\/\([^/][^/]*\)\/*$/{
66080	    s//\1/
66081	    q
66082	  }
66083	  /^X\/\(\/\/\)$/{
66084	    s//\1/
66085	    q
66086	  }
66087	  /^X\/\(\/\).*/{
66088	    s//\1/
66089	    q
66090	  }
66091	  s/.*/./; q'`
66092
66093# Avoid depending upon Character Ranges.
66094as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66095as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66096as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66097as_cr_digits='0123456789'
66098as_cr_alnum=$as_cr_Letters$as_cr_digits
66099
66100ECHO_C= ECHO_N= ECHO_T=
66101case `echo -n x` in #(((((
66102-n*)
66103  case `echo 'xy\c'` in
66104  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66105  xy)  ECHO_C='\c';;
66106  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66107       ECHO_T='	';;
66108  esac;;
66109*)
66110  ECHO_N='-n';;
66111esac
66112
66113rm -f conf$$ conf$$.exe conf$$.file
66114if test -d conf$$.dir; then
66115  rm -f conf$$.dir/conf$$.file
66116else
66117  rm -f conf$$.dir
66118  mkdir conf$$.dir 2>/dev/null
66119fi
66120if (echo >conf$$.file) 2>/dev/null; then
66121  if ln -s conf$$.file conf$$ 2>/dev/null; then
66122    as_ln_s='ln -s'
66123    # ... but there are two gotchas:
66124    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66125    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66126    # In both cases, we have to default to `cp -pR'.
66127    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66128      as_ln_s='cp -pR'
66129  elif ln conf$$.file conf$$ 2>/dev/null; then
66130    as_ln_s=ln
66131  else
66132    as_ln_s='cp -pR'
66133  fi
66134else
66135  as_ln_s='cp -pR'
66136fi
66137rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66138rmdir conf$$.dir 2>/dev/null
66139
66140
66141# as_fn_mkdir_p
66142# -------------
66143# Create "$as_dir" as a directory, including parents if necessary.
66144as_fn_mkdir_p ()
66145{
66146
66147  case $as_dir in #(
66148  -*) as_dir=./$as_dir;;
66149  esac
66150  test -d "$as_dir" || eval $as_mkdir_p || {
66151    as_dirs=
66152    while :; do
66153      case $as_dir in #(
66154      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66155      *) as_qdir=$as_dir;;
66156      esac
66157      as_dirs="'$as_qdir' $as_dirs"
66158      as_dir=`$as_dirname -- "$as_dir" ||
66159$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66160	 X"$as_dir" : 'X\(//\)[^/]' \| \
66161	 X"$as_dir" : 'X\(//\)$' \| \
66162	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66163$as_echo X"$as_dir" |
66164    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66165	    s//\1/
66166	    q
66167	  }
66168	  /^X\(\/\/\)[^/].*/{
66169	    s//\1/
66170	    q
66171	  }
66172	  /^X\(\/\/\)$/{
66173	    s//\1/
66174	    q
66175	  }
66176	  /^X\(\/\).*/{
66177	    s//\1/
66178	    q
66179	  }
66180	  s/.*/./; q'`
66181      test -d "$as_dir" && break
66182    done
66183    test -z "$as_dirs" || eval "mkdir $as_dirs"
66184  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66185
66186
66187} # as_fn_mkdir_p
66188if mkdir -p . 2>/dev/null; then
66189  as_mkdir_p='mkdir -p "$as_dir"'
66190else
66191  test -d ./-p && rmdir ./-p
66192  as_mkdir_p=false
66193fi
66194
66195
66196# as_fn_executable_p FILE
66197# -----------------------
66198# Test if FILE is an executable regular file.
66199as_fn_executable_p ()
66200{
66201  test -f "$1" && test -x "$1"
66202} # as_fn_executable_p
66203as_test_x='test -x'
66204as_executable_p=as_fn_executable_p
66205
66206# Sed expression to map a string onto a valid CPP name.
66207as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66208
66209# Sed expression to map a string onto a valid variable name.
66210as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66211
66212
66213exec 6>&1
66214## ----------------------------------- ##
66215## Main body of $CONFIG_STATUS script. ##
66216## ----------------------------------- ##
66217_ASEOF
66218test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66219
66220cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66221# Save the log message, to keep $0 and so on meaningful, and to
66222# report actual input values of CONFIG_FILES etc. instead of their
66223# values after options handling.
66224ac_log="
66225This file was extended by OpenJDK $as_me jdk9, which was
66226generated by GNU Autoconf 2.69.  Invocation command line was
66227
66228  CONFIG_FILES    = $CONFIG_FILES
66229  CONFIG_HEADERS  = $CONFIG_HEADERS
66230  CONFIG_LINKS    = $CONFIG_LINKS
66231  CONFIG_COMMANDS = $CONFIG_COMMANDS
66232  $ $0 $@
66233
66234on `(hostname || uname -n) 2>/dev/null | sed 1q`
66235"
66236
66237_ACEOF
66238
66239case $ac_config_files in *"
66240"*) set x $ac_config_files; shift; ac_config_files=$*;;
66241esac
66242
66243
66244
66245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66246# Files that config.status was made for.
66247config_files="$ac_config_files"
66248
66249_ACEOF
66250
66251cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66252ac_cs_usage="\
66253\`$as_me' instantiates files and other configuration actions
66254from templates according to the current configuration.  Unless the files
66255and actions are specified as TAGs, all are instantiated by default.
66256
66257Usage: $0 [OPTION]... [TAG]...
66258
66259  -h, --help       print this help, then exit
66260  -V, --version    print version number and configuration settings, then exit
66261      --config     print configuration, then exit
66262  -q, --quiet, --silent
66263                   do not print progress messages
66264  -d, --debug      don't remove temporary files
66265      --recheck    update $as_me by reconfiguring in the same conditions
66266      --file=FILE[:TEMPLATE]
66267                   instantiate the configuration file FILE
66268
66269Configuration files:
66270$config_files
66271
66272Report bugs to <build-dev@openjdk.java.net>.
66273OpenJDK home page: <http://openjdk.java.net>."
66274
66275_ACEOF
66276cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66277ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66278ac_cs_version="\\
66279OpenJDK config.status jdk9
66280configured by $0, generated by GNU Autoconf 2.69,
66281  with options \\"\$ac_cs_config\\"
66282
66283Copyright (C) 2012 Free Software Foundation, Inc.
66284This config.status script is free software; the Free Software Foundation
66285gives unlimited permission to copy, distribute and modify it."
66286
66287ac_pwd='$ac_pwd'
66288srcdir='$srcdir'
66289AWK='$AWK'
66290test -n "\$AWK" || AWK=awk
66291_ACEOF
66292
66293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66294# The default lists apply if the user does not specify any file.
66295ac_need_defaults=:
66296while test $# != 0
66297do
66298  case $1 in
66299  --*=?*)
66300    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66301    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66302    ac_shift=:
66303    ;;
66304  --*=)
66305    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66306    ac_optarg=
66307    ac_shift=:
66308    ;;
66309  *)
66310    ac_option=$1
66311    ac_optarg=$2
66312    ac_shift=shift
66313    ;;
66314  esac
66315
66316  case $ac_option in
66317  # Handling of the options.
66318  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66319    ac_cs_recheck=: ;;
66320  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66321    $as_echo "$ac_cs_version"; exit ;;
66322  --config | --confi | --conf | --con | --co | --c )
66323    $as_echo "$ac_cs_config"; exit ;;
66324  --debug | --debu | --deb | --de | --d | -d )
66325    debug=: ;;
66326  --file | --fil | --fi | --f )
66327    $ac_shift
66328    case $ac_optarg in
66329    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66330    '') as_fn_error $? "missing file argument" ;;
66331    esac
66332    as_fn_append CONFIG_FILES " '$ac_optarg'"
66333    ac_need_defaults=false;;
66334  --he | --h |  --help | --hel | -h )
66335    $as_echo "$ac_cs_usage"; exit ;;
66336  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66337  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66338    ac_cs_silent=: ;;
66339
66340  # This is an error.
66341  -*) as_fn_error $? "unrecognized option: \`$1'
66342Try \`$0 --help' for more information." ;;
66343
66344  *) as_fn_append ac_config_targets " $1"
66345     ac_need_defaults=false ;;
66346
66347  esac
66348  shift
66349done
66350
66351ac_configure_extra_args=
66352
66353if $ac_cs_silent; then
66354  exec 6>/dev/null
66355  ac_configure_extra_args="$ac_configure_extra_args --silent"
66356fi
66357
66358_ACEOF
66359cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66360if \$ac_cs_recheck; then
66361  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66362  shift
66363  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66364  CONFIG_SHELL='$SHELL'
66365  export CONFIG_SHELL
66366  exec "\$@"
66367fi
66368
66369_ACEOF
66370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66371exec 5>>config.log
66372{
66373  echo
66374  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66375## Running $as_me. ##
66376_ASBOX
66377  $as_echo "$ac_log"
66378} >&5
66379
66380_ACEOF
66381cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66382_ACEOF
66383
66384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66385
66386# Handling of arguments.
66387for ac_config_target in $ac_config_targets
66388do
66389  case $ac_config_target in
66390    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66391    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66392    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66393    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66394    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66395
66396  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66397  esac
66398done
66399
66400
66401# If the user did not use the arguments to specify the items to instantiate,
66402# then the envvar interface is used.  Set only those that are not.
66403# We use the long form for the default assignment because of an extremely
66404# bizarre bug on SunOS 4.1.3.
66405if $ac_need_defaults; then
66406  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66407fi
66408
66409# Have a temporary directory for convenience.  Make it in the build tree
66410# simply because there is no reason against having it here, and in addition,
66411# creating and moving files from /tmp can sometimes cause problems.
66412# Hook for its removal unless debugging.
66413# Note that there is a small window in which the directory will not be cleaned:
66414# after its creation but before its name has been assigned to `$tmp'.
66415$debug ||
66416{
66417  tmp= ac_tmp=
66418  trap 'exit_status=$?
66419  : "${ac_tmp:=$tmp}"
66420  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66421' 0
66422  trap 'as_fn_exit 1' 1 2 13 15
66423}
66424# Create a (secure) tmp directory for tmp files.
66425
66426{
66427  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66428  test -d "$tmp"
66429}  ||
66430{
66431  tmp=./conf$$-$RANDOM
66432  (umask 077 && mkdir "$tmp")
66433} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66434ac_tmp=$tmp
66435
66436# Set up the scripts for CONFIG_FILES section.
66437# No need to generate them if there are no CONFIG_FILES.
66438# This happens for instance with `./config.status config.h'.
66439if test -n "$CONFIG_FILES"; then
66440
66441
66442ac_cr=`echo X | tr X '\015'`
66443# On cygwin, bash can eat \r inside `` if the user requested igncr.
66444# But we know of no other shell where ac_cr would be empty at this
66445# point, so we can use a bashism as a fallback.
66446if test "x$ac_cr" = x; then
66447  eval ac_cr=\$\'\\r\'
66448fi
66449ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66450if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66451  ac_cs_awk_cr='\\r'
66452else
66453  ac_cs_awk_cr=$ac_cr
66454fi
66455
66456echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66457_ACEOF
66458
66459
66460{
66461  echo "cat >conf$$subs.awk <<_ACEOF" &&
66462  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66463  echo "_ACEOF"
66464} >conf$$subs.sh ||
66465  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66466ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66467ac_delim='%!_!# '
66468for ac_last_try in false false false false false :; do
66469  . ./conf$$subs.sh ||
66470    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66471
66472  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66473  if test $ac_delim_n = $ac_delim_num; then
66474    break
66475  elif $ac_last_try; then
66476    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66477  else
66478    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66479  fi
66480done
66481rm -f conf$$subs.sh
66482
66483cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66484cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66485_ACEOF
66486sed -n '
66487h
66488s/^/S["/; s/!.*/"]=/
66489p
66490g
66491s/^[^!]*!//
66492:repl
66493t repl
66494s/'"$ac_delim"'$//
66495t delim
66496:nl
66497h
66498s/\(.\{148\}\)..*/\1/
66499t more1
66500s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66501p
66502n
66503b repl
66504:more1
66505s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66506p
66507g
66508s/.\{148\}//
66509t nl
66510:delim
66511h
66512s/\(.\{148\}\)..*/\1/
66513t more2
66514s/["\\]/\\&/g; s/^/"/; s/$/"/
66515p
66516b
66517:more2
66518s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66519p
66520g
66521s/.\{148\}//
66522t delim
66523' <conf$$subs.awk | sed '
66524/^[^""]/{
66525  N
66526  s/\n//
66527}
66528' >>$CONFIG_STATUS || ac_write_fail=1
66529rm -f conf$$subs.awk
66530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66531_ACAWK
66532cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66533  for (key in S) S_is_set[key] = 1
66534  FS = ""
66535
66536}
66537{
66538  line = $ 0
66539  nfields = split(line, field, "@")
66540  substed = 0
66541  len = length(field[1])
66542  for (i = 2; i < nfields; i++) {
66543    key = field[i]
66544    keylen = length(key)
66545    if (S_is_set[key]) {
66546      value = S[key]
66547      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66548      len += length(value) + length(field[++i])
66549      substed = 1
66550    } else
66551      len += 1 + keylen
66552  }
66553
66554  print line
66555}
66556
66557_ACAWK
66558_ACEOF
66559cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66560if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66561  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66562else
66563  cat
66564fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66565  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66566_ACEOF
66567
66568# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66569# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66570# trailing colons and then remove the whole line if VPATH becomes empty
66571# (actually we leave an empty line to preserve line numbers).
66572if test "x$srcdir" = x.; then
66573  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66574h
66575s///
66576s/^/:/
66577s/[	 ]*$/:/
66578s/:\$(srcdir):/:/g
66579s/:\${srcdir}:/:/g
66580s/:@srcdir@:/:/g
66581s/^:*//
66582s/:*$//
66583x
66584s/\(=[	 ]*\).*/\1/
66585G
66586s/\n//
66587s/^[^=]*=[	 ]*$//
66588}'
66589fi
66590
66591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66592fi # test -n "$CONFIG_FILES"
66593
66594
66595eval set X "  :F $CONFIG_FILES      "
66596shift
66597for ac_tag
66598do
66599  case $ac_tag in
66600  :[FHLC]) ac_mode=$ac_tag; continue;;
66601  esac
66602  case $ac_mode$ac_tag in
66603  :[FHL]*:*);;
66604  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66605  :[FH]-) ac_tag=-:-;;
66606  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66607  esac
66608  ac_save_IFS=$IFS
66609  IFS=:
66610  set x $ac_tag
66611  IFS=$ac_save_IFS
66612  shift
66613  ac_file=$1
66614  shift
66615
66616  case $ac_mode in
66617  :L) ac_source=$1;;
66618  :[FH])
66619    ac_file_inputs=
66620    for ac_f
66621    do
66622      case $ac_f in
66623      -) ac_f="$ac_tmp/stdin";;
66624      *) # Look for the file first in the build tree, then in the source tree
66625	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66626	 # because $ac_f cannot contain `:'.
66627	 test -f "$ac_f" ||
66628	   case $ac_f in
66629	   [\\/$]*) false;;
66630	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66631	   esac ||
66632	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66633      esac
66634      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66635      as_fn_append ac_file_inputs " '$ac_f'"
66636    done
66637
66638    # Let's still pretend it is `configure' which instantiates (i.e., don't
66639    # use $as_me), people would be surprised to read:
66640    #    /* config.h.  Generated by config.status.  */
66641    configure_input='Generated from '`
66642	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66643	`' by configure.'
66644    if test x"$ac_file" != x-; then
66645      configure_input="$ac_file.  $configure_input"
66646      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66647$as_echo "$as_me: creating $ac_file" >&6;}
66648    fi
66649    # Neutralize special characters interpreted by sed in replacement strings.
66650    case $configure_input in #(
66651    *\&* | *\|* | *\\* )
66652       ac_sed_conf_input=`$as_echo "$configure_input" |
66653       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66654    *) ac_sed_conf_input=$configure_input;;
66655    esac
66656
66657    case $ac_tag in
66658    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66659      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66660    esac
66661    ;;
66662  esac
66663
66664  ac_dir=`$as_dirname -- "$ac_file" ||
66665$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66666	 X"$ac_file" : 'X\(//\)[^/]' \| \
66667	 X"$ac_file" : 'X\(//\)$' \| \
66668	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66669$as_echo X"$ac_file" |
66670    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66671	    s//\1/
66672	    q
66673	  }
66674	  /^X\(\/\/\)[^/].*/{
66675	    s//\1/
66676	    q
66677	  }
66678	  /^X\(\/\/\)$/{
66679	    s//\1/
66680	    q
66681	  }
66682	  /^X\(\/\).*/{
66683	    s//\1/
66684	    q
66685	  }
66686	  s/.*/./; q'`
66687  as_dir="$ac_dir"; as_fn_mkdir_p
66688  ac_builddir=.
66689
66690case "$ac_dir" in
66691.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66692*)
66693  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66694  # A ".." for each directory in $ac_dir_suffix.
66695  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66696  case $ac_top_builddir_sub in
66697  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66698  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66699  esac ;;
66700esac
66701ac_abs_top_builddir=$ac_pwd
66702ac_abs_builddir=$ac_pwd$ac_dir_suffix
66703# for backward compatibility:
66704ac_top_builddir=$ac_top_build_prefix
66705
66706case $srcdir in
66707  .)  # We are building in place.
66708    ac_srcdir=.
66709    ac_top_srcdir=$ac_top_builddir_sub
66710    ac_abs_top_srcdir=$ac_pwd ;;
66711  [\\/]* | ?:[\\/]* )  # Absolute name.
66712    ac_srcdir=$srcdir$ac_dir_suffix;
66713    ac_top_srcdir=$srcdir
66714    ac_abs_top_srcdir=$srcdir ;;
66715  *) # Relative name.
66716    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66717    ac_top_srcdir=$ac_top_build_prefix$srcdir
66718    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66719esac
66720ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66721
66722
66723  case $ac_mode in
66724  :F)
66725  #
66726  # CONFIG_FILE
66727  #
66728
66729_ACEOF
66730
66731cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66732# If the template does not know about datarootdir, expand it.
66733# FIXME: This hack should be removed a few years after 2.60.
66734ac_datarootdir_hack=; ac_datarootdir_seen=
66735ac_sed_dataroot='
66736/datarootdir/ {
66737  p
66738  q
66739}
66740/@datadir@/p
66741/@docdir@/p
66742/@infodir@/p
66743/@localedir@/p
66744/@mandir@/p'
66745case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66746*datarootdir*) ac_datarootdir_seen=yes;;
66747*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66748  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66749$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66750_ACEOF
66751cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66752  ac_datarootdir_hack='
66753  s&@datadir@&$datadir&g
66754  s&@docdir@&$docdir&g
66755  s&@infodir@&$infodir&g
66756  s&@localedir@&$localedir&g
66757  s&@mandir@&$mandir&g
66758  s&\\\${datarootdir}&$datarootdir&g' ;;
66759esac
66760_ACEOF
66761
66762# Neutralize VPATH when `$srcdir' = `.'.
66763# Shell code in configure.ac might set extrasub.
66764# FIXME: do we really want to maintain this feature?
66765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66766ac_sed_extra="$ac_vpsub
66767$extrasub
66768_ACEOF
66769cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66770:t
66771/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66772s|@configure_input@|$ac_sed_conf_input|;t t
66773s&@top_builddir@&$ac_top_builddir_sub&;t t
66774s&@top_build_prefix@&$ac_top_build_prefix&;t t
66775s&@srcdir@&$ac_srcdir&;t t
66776s&@abs_srcdir@&$ac_abs_srcdir&;t t
66777s&@top_srcdir@&$ac_top_srcdir&;t t
66778s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66779s&@builddir@&$ac_builddir&;t t
66780s&@abs_builddir@&$ac_abs_builddir&;t t
66781s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66782$ac_datarootdir_hack
66783"
66784eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66785  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66786
66787test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66788  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66789  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66790      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66791  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66792which seems to be undefined.  Please make sure it is defined" >&5
66793$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66794which seems to be undefined.  Please make sure it is defined" >&2;}
66795
66796  rm -f "$ac_tmp/stdin"
66797  case $ac_file in
66798  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66799  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66800  esac \
66801  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66802 ;;
66803
66804
66805
66806  esac
66807
66808done # for ac_tag
66809
66810
66811as_fn_exit 0
66812_ACEOF
66813ac_clean_files=$ac_clean_files_save
66814
66815test $ac_write_fail = 0 ||
66816  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66817
66818
66819# configure is writing to config.log, and then calls config.status.
66820# config.status does its own redirection, appending to config.log.
66821# Unfortunately, on DOS this fails, as config.log is still kept open
66822# by configure, so config.status won't be able to write to it; its
66823# output is simply discarded.  So we exec the FD to /dev/null,
66824# effectively closing config.log, so it can be properly (re)opened and
66825# appended to by config.status.  When coming back to configure, we
66826# need to make the FD available again.
66827if test "$no_create" != yes; then
66828  ac_cs_success=:
66829  ac_config_status_args=
66830  test "$silent" = yes &&
66831    ac_config_status_args="$ac_config_status_args --quiet"
66832  exec 5>/dev/null
66833  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66834  exec 5>>config.log
66835  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66836  # would make configure fail if this is the last instruction.
66837  $ac_cs_success || as_fn_exit 1
66838fi
66839if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66840  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66841$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66842fi
66843
66844
66845# After AC_OUTPUT, we need to do final work
66846
66847
66848  # Try to move config.log (generated by autoconf) to the configure-support directory.
66849  if test -e ./config.log; then
66850    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66851  fi
66852
66853  # Rotate our log file (configure.log)
66854  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66855    $RM -f "$OUTPUT_ROOT/configure.log.old"
66856  fi
66857  if test -e "$OUTPUT_ROOT/configure.log"; then
66858    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66859  fi
66860
66861  # Move configure.log from current directory to the build output root
66862  if test -e ./configure.log; then
66863    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66864  fi
66865
66866  # Make the compare script executable
66867  $CHMOD +x $OUTPUT_ROOT/compare.sh
66868
66869
66870# Finally output some useful information to the user
66871
66872  # Finally output some useful information to the user
66873
66874  printf "\n"
66875  printf "====================================================\n"
66876  if test "x$no_create" != "xyes"; then
66877    if test "x$IS_RECONFIGURE" != "xyes"; then
66878      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66879    else
66880      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66881    fi
66882  else
66883    if test "x$IS_RECONFIGURE" != "xyes"; then
66884      printf "A configuration has been successfully checked but not created\n"
66885    else
66886      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66887    fi
66888  fi
66889  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66890    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66891  else
66892    printf "using default settings.\n"
66893  fi
66894
66895  printf "\n"
66896  printf "Configuration summary:\n"
66897  printf "* Debug level:    $DEBUG_LEVEL\n"
66898  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66899  printf "* JDK variant:    $JDK_VARIANT\n"
66900  printf "* JVM variants:   $JVM_VARIANTS\n"
66901  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66902  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66903
66904  printf "\n"
66905  printf "Tools summary:\n"
66906  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66907    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66908  fi
66909  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66910  if test "x$TOOLCHAIN_VERSION" != "x"; then
66911    print_version=" $TOOLCHAIN_VERSION"
66912  fi
66913  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66914  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66915  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66916
66917  printf "\n"
66918  printf "Build performance summary:\n"
66919  printf "* Cores to use:   $JOBS\n"
66920  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66921  if test "x$CCACHE_STATUS" != "x"; then
66922    printf "* ccache status:  $CCACHE_STATUS\n"
66923  fi
66924  printf "\n"
66925
66926  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66927    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66928    printf "will result in longer build times.\n"
66929    printf "\n"
66930  fi
66931
66932  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66933    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66934    printf "These are not respected, and will be ignored. It is recommended\n"
66935    printf "that you clean your environment. The following variables are set:\n"
66936    printf "$FOUND_ALT_VARIABLES\n"
66937    printf "\n"
66938  fi
66939
66940  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66941    printf "WARNING: Your build output directory is not on a local disk.\n"
66942    printf "This will severely degrade build performance!\n"
66943    printf "It is recommended that you create an output directory on a local disk,\n"
66944    printf "and run the configure script again from that directory.\n"
66945    printf "\n"
66946  fi
66947
66948  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66949    printf "WARNING: The result of this configuration has overridden an older\n"
66950    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66951    printf "proper build. Failure to do so might result in strange build problems.\n"
66952    printf "\n"
66953  fi
66954
66955  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66956    printf "WARNING: The result of this configuration was not saved.\n"
66957    printf "You should run without '--no-create | -n' to create the configuration.\n"
66958    printf "\n"
66959  fi
66960
66961
66962
66963  # Locate config.log.
66964  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66965    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66966  elif test -e "./config.log"; then
66967    CONFIG_LOG_PATH="."
66968  fi
66969
66970  if test -e "$CONFIG_LOG_PATH/config.log"; then
66971    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66972    if test $? -eq 0; then
66973      printf "The following warnings were produced. Repeated here for convenience:\n"
66974      # We must quote sed expression (using []) to stop m4 from eating the [].
66975      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66976      printf "\n"
66977    fi
66978  fi
66979
66980